Lines Matching refs:assert
180 assert(crypto_pwhash_argon2id(out, sizeof out, "password", strlen("password"), salt,
210 assert(out != NULL);
213 assert(passwd != NULL);
295 assert(str_out[crypto_pwhash_argon2id_STRBYTES - 1U] == 0);
362 assert(crypto_pwhash_str_alg(str_out, "test", 4, OPSLIMIT, MEMLIMIT,
364 assert(crypto_pwhash_argon2id_str_verify(str_out, "test", 4) == 0);
365 assert(crypto_pwhash_argon2id_str_needs_rehash(str_out,
367 assert(crypto_pwhash_argon2id_str_needs_rehash(str_out,
369 assert(crypto_pwhash_argon2id_str_needs_rehash(str_out,
371 assert(crypto_pwhash_argon2id_str_needs_rehash(str_out, 0, 0) == 1);
372 assert(crypto_pwhash_argon2i_str_needs_rehash(str_out, 0, 0) == -1);
373 assert(crypto_pwhash_argon2id_str_needs_rehash(str_out + 1,
375 assert(crypto_pwhash_argon2i_str_needs_rehash(str_out, 0, 0) == -1);
376 assert(crypto_pwhash_argon2i_str_needs_rehash("", OPSLIMIT, MEMLIMIT) == -1);
377 assert(crypto_pwhash_str_alg(str_out, "test", 4, OPSLIMIT, MEMLIMIT,
379 assert(crypto_pwhash_argon2i_str_verify(str_out, "test", 4) == 0);
380 assert(crypto_pwhash_argon2i_str_needs_rehash(str_out,
382 assert(crypto_pwhash_argon2i_str_needs_rehash(str_out,
384 assert(crypto_pwhash_argon2i_str_needs_rehash(str_out,
386 assert(crypto_pwhash_argon2i_str_needs_rehash(str_out, 0, 0) == 1);
387 assert(crypto_pwhash_argon2id_str_needs_rehash(str_out, 0, 0) == -1);
388 assert(crypto_pwhash_argon2i_str_needs_rehash("", OPSLIMIT, MEMLIMIT) == -1);
389 assert(crypto_pwhash_argon2i_str_needs_rehash(str_out + 1,
404 assert(crypto_pwhash_bytes_min() > 0U);
405 assert(crypto_pwhash_bytes_max() > crypto_pwhash_bytes_min());
406 assert(crypto_pwhash_passwd_max() > crypto_pwhash_passwd_min());
407 assert(crypto_pwhash_saltbytes() > 0U);
408 assert(crypto_pwhash_strbytes() > 1U);
409 assert(crypto_pwhash_strbytes() > strlen(crypto_pwhash_strprefix()));
411 assert(crypto_pwhash_opslimit_min() > 0U);
412 assert(crypto_pwhash_opslimit_max() > 0U);
413 assert(crypto_pwhash_memlimit_min() > 0U);
414 assert(crypto_pwhash_memlimit_max() > 0U);
415 assert(crypto_pwhash_opslimit_interactive() > 0U);
416 assert(crypto_pwhash_memlimit_interactive() > 0U);
417 assert(crypto_pwhash_opslimit_moderate() > 0U);
418 assert(crypto_pwhash_memlimit_moderate() > 0U);
419 assert(crypto_pwhash_opslimit_sensitive() > 0U);
420 assert(crypto_pwhash_memlimit_sensitive() > 0U);
421 assert(strcmp(crypto_pwhash_primitive(), "argon2i") == 0);
423 assert(crypto_pwhash_bytes_min() == crypto_pwhash_BYTES_MIN);
424 assert(crypto_pwhash_bytes_max() == crypto_pwhash_BYTES_MAX);
425 assert(crypto_pwhash_passwd_min() == crypto_pwhash_PASSWD_MIN);
426 assert(crypto_pwhash_passwd_max() == crypto_pwhash_PASSWD_MAX);
427 assert(crypto_pwhash_saltbytes() == crypto_pwhash_SALTBYTES);
428 assert(crypto_pwhash_strbytes() == crypto_pwhash_STRBYTES);
430 assert(crypto_pwhash_opslimit_min() == crypto_pwhash_OPSLIMIT_MIN);
431 assert(crypto_pwhash_opslimit_max() == crypto_pwhash_OPSLIMIT_MAX);
432 assert(crypto_pwhash_memlimit_min() == crypto_pwhash_MEMLIMIT_MIN);
433 assert(crypto_pwhash_memlimit_max() == crypto_pwhash_MEMLIMIT_MAX);
434 assert(crypto_pwhash_opslimit_interactive() ==
436 assert(crypto_pwhash_memlimit_interactive() ==
438 assert(crypto_pwhash_opslimit_moderate() ==
440 assert(crypto_pwhash_memlimit_moderate() ==
442 assert(crypto_pwhash_opslimit_sensitive() ==
444 assert(crypto_pwhash_memlimit_sensitive() ==
447 assert(crypto_pwhash_argon2id_bytes_min() == crypto_pwhash_bytes_min());
448 assert(crypto_pwhash_argon2id_bytes_max() == crypto_pwhash_bytes_max());
449 assert(crypto_pwhash_argon2id_passwd_min() == crypto_pwhash_passwd_min());
450 assert(crypto_pwhash_argon2id_passwd_max() == crypto_pwhash_passwd_max());
451 assert(crypto_pwhash_argon2id_saltbytes() == crypto_pwhash_saltbytes());
452 assert(crypto_pwhash_argon2id_strbytes() == crypto_pwhash_strbytes());
453 assert(strcmp(crypto_pwhash_argon2id_strprefix(),
455 assert(crypto_pwhash_argon2id_opslimit_min() ==
457 assert(crypto_pwhash_argon2id_opslimit_max() ==
459 assert(crypto_pwhash_argon2id_memlimit_min() ==
461 assert(crypto_pwhash_argon2id_memlimit_max() ==
463 assert(crypto_pwhash_argon2id_opslimit_interactive() ==
465 assert(crypto_pwhash_argon2id_opslimit_moderate() ==
467 assert(crypto_pwhash_argon2id_opslimit_sensitive() ==
469 assert(crypto_pwhash_argon2id_memlimit_interactive() ==
471 assert(crypto_pwhash_argon2id_memlimit_moderate() ==
473 assert(crypto_pwhash_argon2id_memlimit_sensitive() ==
475 assert(crypto_pwhash_alg_argon2id13() ==
477 assert(crypto_pwhash_alg_argon2i13() == crypto_pwhash_ALG_ARGON2I13);
478 assert(crypto_pwhash_alg_argon2i13() != crypto_pwhash_alg_default());
479 assert(crypto_pwhash_alg_argon2id13() == crypto_pwhash_ALG_ARGON2ID13);
480 assert(crypto_pwhash_alg_argon2id13() != crypto_pwhash_alg_argon2i13());
481 assert(crypto_pwhash_alg_argon2id13() == crypto_pwhash_alg_default());
483 assert(crypto_pwhash_argon2id(NULL, 0, NULL, 0, NULL,
487 assert(crypto_pwhash_argon2id(NULL, 0, NULL, 0, NULL,
491 assert(crypto_pwhash_argon2i(NULL, 0, NULL, 0, NULL,
495 assert(crypto_pwhash_argon2i(NULL, 0, NULL, 0, NULL,