adler32.h

00001 #ifndef CRYPTOPP_ADLER32_H
00002 #define CRYPTOPP_ADLER32_H
00003 
00004 #include "cryptlib.h"
00005 
00006 NAMESPACE_BEGIN(CryptoPP)
00007 
00008 //! ADLER-32 checksum calculations 
00009 class Adler32 : public HashTransformation
00010 {
00011 public:
00012     CRYPTOPP_CONSTANT(DIGESTSIZE = 4)
00013     Adler32() {Reset();}
00014     void Update(const byte *input, size_t length);
00015     void TruncatedFinal(byte *hash, size_t size);
00016     unsigned int DigestSize() const {return DIGESTSIZE;}
00017     std::string AlgorithmName() const {return "Adler32";}
00018 
00019 private:
00020     void Reset() {m_s1 = 1; m_s2 = 0;}
00021 
00022     word16 m_s1, m_s2;
00023 };
00024 
00025 NAMESPACE_END
00026 
00027 #endif

Generated on Thu Jul 5 22:21:36 2007 for Crypto++ by  doxygen 1.5.2