diff options
Diffstat (limited to 'com/BLAKE2/test_fns.c')
-rw-r--r-- | com/BLAKE2/test_fns.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/com/BLAKE2/test_fns.c b/com/BLAKE2/test_fns.c deleted file mode 100644 index ca3551a..0000000 --- a/com/BLAKE2/test_fns.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "blake2s.h" -#include <assert.h> -#include <stdio.h> - -_Static_assert(sizeof(struct BLAKE2s_param) == (8 * sizeof(uint32_t)), "sizeof struct BLAKE2s_param"); - -int -main(void) -{ - assert(rotr_u32(0xdecafade, 16) == 0xfadedeca); - assert(rotr_u32(0xdecafade, 8) == 0xdedecafa); - - union { - struct BLAKE2s_param block; - uint32_t data[8]; - } p; - p.block.outlen = 32; - p.block.keylen = 0; - p.block.fanout = 1; - p.block.depth = 1; - p.block.leaf_length = 0; - p.block.node_offset = 0; - p.block.node_offset_ex = 0; - p.block.node_depth = 0; - p.block.inner_length = 0; - p.block.salt = 0; - p.block.personalization = 0; - - for (int i = 0; i < 8; ++i) printf("%08x ", p.data[i]); - printf("\n"); - - assert(p.data[0] == (0x01010000 ^ 32)); - -} |