Lines Matching defs:tests
19 } tests[] = {
101 tests[i].passwd_hex, strlen(tests[i].passwd_hex), NULL,
103 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
104 strlen(tests[i].salt_hex), NULL, NULL, NULL);
106 out, (unsigned long long) tests[i].outlen, passwd,
107 tests[i].passwdlen, (const unsigned char *) salt,
108 tests[i].opslimit, tests[i].memlimit) != 0) {
111 sodium_bin2hex(out_hex, sizeof out_hex, out, tests[i].outlen);
113 } while (++i < (sizeof tests) / (sizeof tests[0]));
126 } tests[] = {
150 tests[i].passwd_hex, strlen(tests[i].passwd_hex), NULL,
152 sodium_hex2bin(salt, sizeof salt, tests[i].salt_hex,
153 strlen(tests[i].salt_hex), NULL, NULL, NULL);
155 out, (unsigned long long) tests[i].outlen, passwd,
156 tests[i].passwdlen, (const unsigned char *) salt,
157 tests[i].opslimit, tests[i].memlimit) != 0) {
160 sodium_bin2hex(out_hex, sizeof out_hex, out, tests[i].outlen);
162 } while (++i < (sizeof tests) / (sizeof tests[0]));
171 } tests[] = {
282 out = (char *) sodium_malloc(strlen(tests[i].out) + 1U);
284 memcpy(out, tests[i].out, strlen(tests[i].out) + 1U);
285 passwd = (char *) sodium_malloc(strlen(tests[i].passwd) + 1U);
287 memcpy(passwd, tests[i].passwd, strlen(tests[i].passwd) + 1U);
294 } while (++i < (sizeof tests) / (sizeof tests[0]));