diff options
author | Mattias Andrée <maandree@kth.se> | 2024-09-01 18:12:21 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-09-01 18:12:21 +0200 |
commit | 85b12e691577b4d4fe09b80b06e91a801dc3dfa9 (patch) | |
tree | 69c64bc9a9fc97826fe8cb2d7ef82f00b1193efc /t/ripemd-256.c | |
parent | Add support for BLAKE2 (but not tree-hashing) (diff) | |
download | libhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.gz libhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.bz2 libhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.xz |
Move test files into t/
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 't/ripemd-256.c')
-rw-r--r-- | t/ripemd-256.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/t/ripemd-256.c b/t/ripemd-256.c new file mode 100644 index 0000000..6706b6c --- /dev/null +++ b/t/ripemd-256.c @@ -0,0 +1,51 @@ +/* See LICENSE file for copyright and license details. */ +#ifdef SUPPORT_RIPEMD_256 +# define TEST +# include "../common.h" + + +static struct testcase testcases[] = { + {1, 0, "", + "02ba4c4e5f8ecd1877fc52d64d30e37a2d9774fb1e5d026380ae0168e3c5522d"}, + {1, 0, "a", + "f9333e45d857f5d90a91bab70a1eba0cfb1be4b0783c9acfcd883a9134692925"}, + {1, 0, "abc", + "afbd6e228b9d8cbbcef5ca2d03e6dba10ac0bc7dcbe4680e1e42d2e975459b65"}, + {1, 0, "message digest", + "87e971759a1ce47a514d5c914c392c9018c7c46bc14465554afcdf54a5070c0e"}, + {1, 0, "abcdefghijklmnopqrstuvwxyz", + "649d3034751ea216776bf9a18acc81bc7896118a5197968782dd1fd97d8d5133"}, + {1, 0, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", + "3843045583aac6c8c8d9128573e7a9809afb2a0f34ccc36ea9e72f16f6368e3f"}, + {1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", + "5740a408ac16b720b84424ae931cbb1fe363d1d0bf4017f1a89f7ea6de77a0b8"}, + {8, 0, "1234567890", + "06fdcc7a409548aaf91368c06a6275b553e3f099bf0ea4edfd6778df89a890dd"}, + {1000000UL, 0, "a", + "ac953744e10e31514c150d4d8d7b677342e33399788296e43ae4850ce4f97978"}, + {0, 1, "\xff", + "837e2738bee15d14b8a6f984b992bcd404e2df2e18f70e89c60647cd90fcfff4"}, + {0, 1, "\x7f", + "837e2738bee15d14b8a6f984b992bcd404e2df2e18f70e89c60647cd90fcfff4"}, + {0, 1, "\x01", + "837e2738bee15d14b8a6f984b992bcd404e2df2e18f70e89c60647cd90fcfff4"}, + {0, 1, "\xfe", + "555d43ce2b77dbc1e292372ef850ff8c92ce2fa6fe778501daf37974948ccfcf"}, + {0, 1, "\x7e", + "555d43ce2b77dbc1e292372ef850ff8c92ce2fa6fe778501daf37974948ccfcf"}, + {0, 1, "\x00", + "555d43ce2b77dbc1e292372ef850ff8c92ce2fa6fe778501daf37974948ccfcf"} +}; + + +#else +# define TEST_UNSUPPORTED +# include "../common.h" +#endif + + +int +main(void) +{ + TEST_MAIN("RIPEMD-256", RIPEMD_256); +} |