Lines Matching refs:tests
20 } tests[] = { in tv() local
89 tests[i].passwd_hex, strlen(tests[i].passwd_hex), NULL, in tv()
91 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex, in tv()
92 strlen(tests[i].salt_hex), NULL, NULL, NULL); in tv()
93 if (crypto_pwhash(out, (unsigned long long) tests[i].outlen, passwd, in tv()
94 tests[i].passwd_len, (const unsigned char *) salt, in tv()
95 tests[i].opslimit, tests[i].memlimit, in tv()
101 sodium_bin2hex(out_hex, sizeof out_hex, out, tests[i].outlen); in tv()
103 } while (++i < (sizeof tests) / (sizeof tests[0])); in tv()
117 } tests[] = { in tv2() local
141 tests[i].passwd_hex, strlen(tests[i].passwd_hex), NULL, in tv2()
143 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex, in tv2()
144 strlen(tests[i].salt_hex), NULL, NULL, NULL); in tv2()
145 if (crypto_pwhash(out, (unsigned long long) tests[i].outlen, passwd, in tv2()
146 tests[i].passwd_len, (const unsigned char *) salt, in tv2()
147 tests[i].opslimit, tests[i].memlimit, in tv2()
152 sodium_bin2hex(out_hex, sizeof out_hex, out, tests[i].outlen); in tv2()
154 } while (++i < (sizeof tests) / (sizeof tests[0])); in tv2()
194 } tests[] = { in tv3() local
214 out = (char *) sodium_malloc(strlen(tests[i].out) + 1U); in tv3()
216 memcpy(out, tests[i].out, strlen(tests[i].out) + 1U); in tv3()
217 passwd = (char *) sodium_malloc(strlen(tests[i].passwd) + 1U); in tv3()
219 memcpy(passwd, tests[i].passwd, strlen(tests[i].passwd) + 1U); in tv3()
227 } while (++i < (sizeof tests) / (sizeof tests[0])); in tv3()