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
00010
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