1 #include <ccan/crypto/sha512/sha512.h>
2 /* Include the C files directly. */
3 #include <ccan/crypto/sha512/sha512.c>
4 #include <ccan/tap/tap.h>
8 struct sha512 h, expected;
9 static const char zeroes[1000];
14 /* Test different alignments. */
15 sha512(&expected, zeroes, sizeof(zeroes) - 64);
16 for (i = 1; i < 64; i++) {
17 sha512(&h, zeroes + i, sizeof(zeroes) - 64);
18 ok1(memcmp(&h, &expected, sizeof(h)) == 0);
21 /* This exits depending on whether all tests passed */