diff options
author | weidai <weidai11@users.noreply.github.com> | 2002-10-04 17:31:41 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2002-10-04 17:31:41 +0000 |
commit | a3b6ece7ab341b5b14135baeccea7d5e4c086771 (patch) | |
tree | 8b045309c238226c32a563b1df6b9c30a2f0e0b3 /tiger.h | |
download | cryptopp-git-a3b6ece7ab341b5b14135baeccea7d5e4c086771.tar.gz |
Initial revision
Diffstat (limited to 'tiger.h')
-rw-r--r-- | tiger.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tiger.h b/tiger.h new file mode 100644 index 00000000..31b5ee67 --- /dev/null +++ b/tiger.h @@ -0,0 +1,32 @@ +#ifndef CRYPTOPP_TIGER_H +#define CRYPTOPP_TIGER_H + +#include "config.h" + +#ifdef WORD64_AVAILABLE + +#include "iterhash.h" + +NAMESPACE_BEGIN(CryptoPP) + +/// <a href="http://www.weidai.com/scan-mirror/md.html#Tiger">Tiger</a> +class Tiger : public IteratedHashWithStaticTransform<word64, LittleEndian, 64, Tiger> +{ +public: + enum {DIGESTSIZE = 24}; + Tiger() : IteratedHashWithStaticTransform<word64, LittleEndian, 64, Tiger>(DIGESTSIZE) {Init();} + static void Transform(word64 *digest, const word64 *data); + void TruncatedFinal(byte *hash, unsigned int size); + static const char * StaticAlgorithmName() {return "Tiger";} + +protected: + void Init(); + + static const word64 table[4*256]; +}; + +NAMESPACE_END + +#endif + +#endif |