Crypto++
|
00001 #ifndef CRYPTOPP_MD5_H 00002 #define CRYPTOPP_MD5_H 00003 00004 #include "iterhash.h" 00005 00006 NAMESPACE_BEGIN(CryptoPP) 00007 00008 namespace Weak1 { 00009 00010 //! <a href="http://www.cryptolounge.org/wiki/MD5">MD5</a> 00011 class MD5 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 16, MD5> 00012 { 00013 public: 00014 static void InitState(HashWordType *state); 00015 static void Transform(word32 *digest, const word32 *data); 00016 static const char * StaticAlgorithmName() {return "MD5";} 00017 }; 00018 00019 } 00020 #if CRYPTOPP_ENABLE_NAMESPACE_WEAK >= 1 00021 namespace Weak {using namespace Weak1;} // import Weak1 into CryptoPP::Weak 00022 #else 00023 using namespace Weak1; // import Weak1 into CryptoPP with warning 00024 #ifdef __GNUC__ 00025 #warning "You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning." 00026 #else 00027 #pragma message("You may be using a weak algorithm that has been retained for backwards compatibility. Please '#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1' before including this .h file and prepend the class name with 'Weak::' to remove this warning.") 00028 #endif 00029 #endif 00030 00031 NAMESPACE_END 00032 00033 #endif