md2.h

00001 #ifndef CRYPTOPP_MD2_H
00002 #define CRYPTOPP_MD2_H
00003 
00004 #include "cryptlib.h"
00005 #include "secblock.h"
00006 
00007 NAMESPACE_BEGIN(CryptoPP)
00008 
00009 /// <a href="http://www.weidai.com/scan-mirror/md.html#MD2">MD2</a>
00010 /** 128 Bit Hash */
00011 class MD2 : public HashTransformation
00012 {
00013 public:
00014         MD2();
00015         void Update(const byte *input, size_t length);
00016         void TruncatedFinal(byte *hash, size_t size);
00017         unsigned int DigestSize() const {return DIGESTSIZE;}
00018         static const char * StaticAlgorithmName() {return "MD2";}
00019 
00020         CRYPTOPP_CONSTANT(DIGESTSIZE = 16)
00021         CRYPTOPP_CONSTANT(BLOCKSIZE = 16)
00022 
00023 private:
00024         void Transform();
00025         void Init();
00026         SecByteBlock m_X, m_C, m_buf;
00027         unsigned int m_count;
00028 };
00029 
00030 NAMESPACE_END
00031 
00032 #endif

Generated on Sat Dec 23 02:07:08 2006 for Crypto++ by  doxygen 1.5.1-p1