Home
last modified time | relevance | path

Searched refs:tests (Results 1 – 7 of 7) sorted by relevance

/crypt/
A Dbadsalttest.c24 static const char *tests[][2] = variable
41 size_t n = sizeof (tests) / sizeof (*tests); in do_test()
61 tests[n - 1][1] = &page[pagesize - 1]; in do_test()
69 if (crypt (tests[i][0], tests[i][1])) in do_test()
73 tests[i][0], tests[i][1]); in do_test()
76 if (crypt_r (tests[i][0], tests[i][1], &cd)) in do_test()
80 tests[i][0], tests[i][1]); in do_test()
A Dmd5test.c8 } tests[] = variable
36 for (cnt = 0; cnt < (int) (sizeof (tests) / sizeof (tests[0])); ++cnt) in main()
41 __md5_process_bytes (tests[cnt].input, strlen (tests[cnt].input), &ctx); in main()
43 result |= memcmp (tests[cnt].result, sum, 16); in main()
46 for (i = 0; tests[cnt].input[i] != '\0'; ++i) in main()
47 __md5_process_bytes (&tests[cnt].input[i], 1, &ctx); in main()
49 result |= memcmp (tests[cnt].result, sum, 16); in main()
A Dsha256c-test.c10 } tests[] = variable
35 #define ntests (sizeof (tests) / sizeof (tests[0]))
47 char *cp = crypt (tests[i].input, tests[i].salt); in do_test()
49 if (strcmp (cp, tests[i].expected) != 0) in do_test()
52 i, tests[i].expected, cp); in do_test()
A Dsha512c-test.c10 } tests[] = variable
37 #define ntests (sizeof (tests) / sizeof (tests[0]))
48 char *cp = crypt (tests[i].input, tests[i].salt); in do_test()
50 if (strcmp (cp, tests[i].expected) != 0) in do_test()
53 i, tests[i].expected, cp); in do_test()
A Dsha512test.c8 } tests[] = variable
71 for (cnt = 0; cnt < (int) (sizeof (tests) / sizeof (tests[0])); ++cnt) in main()
74 __sha512_process_bytes (tests[cnt].input, strlen (tests[cnt].input), in main()
77 if (memcmp (tests[cnt].result, sum, 64) != 0) in main()
84 for (int i = 0; tests[cnt].input[i] != '\0'; ++i) in main()
85 __sha512_process_bytes (&tests[cnt].input[i], 1, &ctx); in main()
87 if (memcmp (tests[cnt].result, sum, 64) != 0) in main()
A Dsha256test.c8 } tests[] = variable
52 for (cnt = 0; cnt < (int) (sizeof (tests) / sizeof (tests[0])); ++cnt) in main()
55 __sha256_process_bytes (tests[cnt].input, strlen (tests[cnt].input), in main()
58 if (memcmp (tests[cnt].result, sum, 32) != 0) in main()
65 for (int i = 0; tests[cnt].input[i] != '\0'; ++i) in main()
66 __sha256_process_bytes (&tests[cnt].input[i], 1, &ctx); in main()
68 if (memcmp (tests[cnt].result, sum, 32) != 0) in main()
A DMakefile33 tests := cert md5c-test sha256c-test sha512c-test badsalttest macro
45 tests += md5test sha256test sha512test
66 $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
68 $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a

Completed in 12 milliseconds