2
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/mkproof synced 2024-06-03 11:36:12 +02:00

returning ARGON2_* values

This commit is contained in:
JP Aumasson 2015-10-21 11:59:39 +02:00
parent 44bca75c81
commit 81bf3ac95b
2 changed files with 6 additions and 5 deletions

View File

@ -119,6 +119,8 @@ typedef enum _Argon2_ErrorCodes {
ARGON2_THREADS_TOO_FEW = 28,
ARGON2_THREADS_TOO_MANY = 29,
ARGON2_MISSING_ARGS = 30,
ARGON2_ERROR_CODES_LENGTH /* Do NOT remove; Do NOT add error codes after
this
error code */

View File

@ -222,7 +222,6 @@ void run(uint8_t *out, char *pwd, uint8_t *salt, uint32_t t_cost,
printf("%2.3f seconds ", run_time);
printf("(%.3f mebicycles)\n", mcycles);
free(in);
}
@ -305,17 +304,17 @@ int main(int argc, char *argv[]) {
#ifdef BENCH
benchmark();
return 0;
return ARGON2_OK;
#endif
#ifdef GENKAT
type = argv[1];
generate_testvectors(type);
return 0;
return ARGON2_OK;
#endif
if (argc < 3) {
usage(argv[0]);
return 1;
return ARGON2_MISSING_ARGS;
}
// get password and salt from command line
@ -363,5 +362,5 @@ int main(int argc, char *argv[]) {
run(out, pwd, salt, t_cost, m_cost, lanes, threads, type);
return 0;
return ARGON2_OK;
}