Lines Matching defs:tests
20 } tests[] = {
89 tests[i].passwd_hex, strlen(tests[i].passwd_hex), NULL,
91 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
92 strlen(tests[i].salt_hex), NULL, NULL, NULL);
93 if (crypto_pwhash(out, (unsigned long long) tests[i].outlen, passwd,
94 tests[i].passwd_len, (const unsigned char *) salt,
95 tests[i].opslimit, tests[i].memlimit,
101 sodium_bin2hex(out_hex, sizeof out_hex, out, tests[i].outlen);
103 } while (++i < (sizeof tests) / (sizeof tests[0]));
117 } tests[] = {
141 tests[i].passwd_hex, strlen(tests[i].passwd_hex), NULL,
143 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
144 strlen(tests[i].salt_hex), NULL, NULL, NULL);
145 if (crypto_pwhash(out, (unsigned long long) tests[i].outlen, passwd,
146 tests[i].passwd_len, (const unsigned char *) salt,
147 tests[i].opslimit, tests[i].memlimit,
152 sodium_bin2hex(out_hex, sizeof out_hex, out, tests[i].outlen);
154 } while (++i < (sizeof tests) / (sizeof tests[0]));
190 } tests[] = {
210 out = (char *) sodium_malloc(strlen(tests[i].out) + 1U);
212 memcpy(out, tests[i].out, strlen(tests[i].out) + 1U);
213 passwd = (char *) sodium_malloc(strlen(tests[i].passwd) + 1U);
215 memcpy(passwd, tests[i].passwd, strlen(tests[i].passwd) + 1U);
223 } while (++i < (sizeof tests) / (sizeof tests[0]));