Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / nettle / testsuite / meta-hash-test.c
blob68debeef65a384fffd1fe6b7f57a78d39fa2eaaf
1 #include "testutils.h"
2 #include "nettle-internal.h"
3 #include "nettle-meta.h"
5 const char* hashes[] = {
6 "md2",
7 "md4",
8 "md5",
9 "ripemd160",
10 "sha1",
11 "sha224",
12 "sha256",
13 "sha384",
14 "sha512"
17 void
18 test_main(void)
20 int i,j;
21 int count = sizeof(hashes)/sizeof(*hashes);
22 for (i = 0; i < count; i++) {
23 for (j = 0; NULL != nettle_hashes[j]; j++) {
24 if (0 == strcmp(hashes[i], nettle_hashes[j]->name))
25 break;
27 ASSERT(NULL != nettle_hashes[j]); /* make sure we found a matching hash */
29 j = 0;
30 while (NULL != nettle_hashes[j])
31 j++;
32 ASSERT(j == count); /* we are not missing testing any hashes */
33 for (j = 0; NULL != nettle_hashes[j]; j++)
34 ASSERT(nettle_hashes[j]->digest_size <= NETTLE_MAX_HASH_DIGEST_SIZE);