From 4ec1f8462de98d1ad83bd69fbc2142ee4beab620 Mon Sep 17 00:00:00 2001 From: weidai Date: Wed, 16 Apr 2003 00:48:47 +0000 Subject: add new algorithms (Kevin Springle) git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@57 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- whrlpool.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 whrlpool.h (limited to 'whrlpool.h') diff --git a/whrlpool.h b/whrlpool.h new file mode 100644 index 0000000..4e3911d --- /dev/null +++ b/whrlpool.h @@ -0,0 +1,31 @@ +#ifndef CRYPTOPP_WHIRLPOOL_H +#define CRYPTOPP_WHIRLPOOL_H + +#include "config.h" + +#ifdef WORD64_AVAILABLE + +#include "iterhash.h" + +NAMESPACE_BEGIN(CryptoPP) + +//! Whirlpool +/*! 512 Bit Hash */ +class Whirlpool : public IteratedHashWithStaticTransform +{ +public: + enum {DIGESTSIZE = 64}; + Whirlpool() : IteratedHashWithStaticTransform(DIGESTSIZE) {Init();} + static void Transform(word64 *digest, const word64 *data); + void TruncatedFinal(byte *hash, unsigned int size); + static const char * StaticAlgorithmName() {return "Whirlpool";} + +protected: + void Init(); +}; + +NAMESPACE_END + +#endif + +#endif -- cgit v1.2.1