Home | History | Annotate | Download | only in default

Lines Matching defs:opslimit

6 #define OPSLIMIT 3
17 unsigned long long opslimit;
95 tests[i].opslimit, tests[i].memlimit,
114 unsigned long long opslimit;
147 tests[i].opslimit, tests[i].memlimit,
181 OPSLIMIT, MEMLIMIT, crypto_pwhash_alg_argon2i13()) == -1);
238 if (crypto_pwhash_str(str_out, passwd, strlen(passwd), OPSLIMIT,
242 if (crypto_pwhash_str(str_out2, passwd, strlen(passwd), OPSLIMIT,
249 if (crypto_pwhash_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT) != 0 ||
250 crypto_pwhash_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT) != 0) {
253 if (crypto_pwhash_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT / 2) != 1 ||
254 crypto_pwhash_str_needs_rehash(str_out, OPSLIMIT - 1, MEMLIMIT) != 1 ||
255 crypto_pwhash_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT * 2) != 1 ||
256 crypto_pwhash_str_needs_rehash(str_out, OPSLIMIT + 1, MEMLIMIT) != 1) {
259 if (crypto_pwhash_argon2id_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT / 2) != 1 ||
260 crypto_pwhash_argon2id_str_needs_rehash(str_out, OPSLIMIT - 1, MEMLIMIT) != 1 ||
261 crypto_pwhash_argon2id_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT * 2) != 1 ||
262 crypto_pwhash_argon2id_str_needs_rehash(str_out, OPSLIMIT + 1, MEMLIMIT) != 1) {
265 if (crypto_pwhash_argon2i_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT / 2) != -1 ||
266 crypto_pwhash_argon2i_str_needs_rehash(str_out, OPSLIMIT - 1, MEMLIMIT) != -1 ||
267 crypto_pwhash_argon2i_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT * 2) != -1 ||
268 crypto_pwhash_argon2i_str_needs_rehash(str_out, OPSLIMIT + 1, MEMLIMIT) != -1) {
271 if (crypto_pwhash_str_needs_rehash(str_out, OPSLIMIT, MEMLIMIT / 2) != 1) {
274 if (crypto_pwhash_str_needs_rehash(str_out + 1, OPSLIMIT, MEMLIMIT) != -1 ||
275 crypto_pwhash_argon2id_str_needs_rehash(str_out + 1, OPSLIMIT, MEMLIMIT) != -1) {
297 if (crypto_pwhash_str(str_out2, passwd, 0x100000000ULL, OPSLIMIT,
302 printf("pwhash_str() with a small opslimit should not have failed\n");
305 printf("pwhash_argon2id_str() with a null opslimit should have failed\n");
362 assert(crypto_pwhash_str_alg(str_out, "test", 4, OPSLIMIT, MEMLIMIT,
366 OPSLIMIT, MEMLIMIT) == 0);
368 OPSLIMIT / 2, MEMLIMIT) == 1);
370 OPSLIMIT, MEMLIMIT / 2) == 1);
374 OPSLIMIT, MEMLIMIT) == -1);
376 assert(crypto_pwhash_argon2i_str_needs_rehash("", OPSLIMIT, MEMLIMIT) == -1);
377 assert(crypto_pwhash_str_alg(str_out, "test", 4, OPSLIMIT, MEMLIMIT,
381 OPSLIMIT, MEMLIMIT) == 0);
383 OPSLIMIT / 2, MEMLIMIT) == 1);
385 OPSLIMIT, MEMLIMIT / 2) == 1);
388 assert(crypto_pwhash_argon2i_str_needs_rehash("", OPSLIMIT, MEMLIMIT) == -1);
390 OPSLIMIT, MEMLIMIT) == -1);