X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/e5b61a8dec3586f96d25bd3ef454176526ff0f69..734a933080d78496fb41100a17815c4f21a41057:/symm/whirlpool.c diff --git a/symm/whirlpool.c b/symm/whirlpool.c index ff517ce1..708e3fce 100644 --- a/symm/whirlpool.c +++ b/symm/whirlpool.c @@ -294,10 +294,31 @@ unsigned long whirlpool_state(whirlpool_ctx *ctx, void *state) /* --- Generic interface --- */ -GHASH_DEF(WHIRLPOOL, whirlpool) +#define HASHES(_) \ + _(WHIRLPOOL, whirlpool) \ + _(WHIRLPOOL256, whirlpool256) -/* --- Test code --- */ +HASHES(GHASH_DEF) -HASH_TEST(WHIRLPOOL, whirlpool) +/*----- Test rig ----------------------------------------------------------*/ + +#ifdef TEST_RIG + +#include + +HASHES(HASH_VERIFY) + +static const test_chunk defs[] = { + HASHES(HASH_TESTDEFS) + { 0, 0, { 0 } } +}; + +int main(int argc, char *argv[]) +{ + test_run(argc, argv, defs, SRCDIR "/t/whirlpool"); + return (0); +} + +#endif /*----- That's all, folks -------------------------------------------------*/