00001 #ifndef CRYPTOPP_MD5MAC_H
00002 #define CRYPTOPP_MD5MAC_H
00003
00004 #include "iterhash.h"
00005
00006 NAMESPACE_BEGIN(CryptoPP)
00007
00009 class MD5MAC : public IteratedHash<word32, false, 64>, public MessageAuthenticationCode, public FixedKeyLength<16>
00010 {
00011 public:
00012 enum {DIGESTSIZE = 16};
00013 MD5MAC(const byte *userKey);
00014 void Final(byte *mac);
00015
00016 protected:
00017 static void Transform (word32 *buf, const word32 *in, const word32 *key);
00018 void vTransform(const word32 *data) {Transform(digest, data, key+4);}
00019 void Init();
00020
00021 static const word32 T[12];
00022 SecBlock<word32> key;
00023 };
00024
00025 NAMESPACE_END
00026
00027 #endif