X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/7a94b69f2993f9c931a6362cbe2d81e68cadfced..84924d420a1ae0012853fa1efe956a2196f4a76e:/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 -------------------------------------------------*/