Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# 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         enum {DIGESTSIZE = 4};
    00013         Adler32() {Reset();}
    00014         void Update(const byte *input, unsigned int length);
    00015         void TruncatedFinal(byte *hash, unsigned int size);
    00016         unsigned int DigestSize() const {return DIGESTSIZE;}
    00017
    00018 private:
    00019         void Reset() {m_s1 = 1; m_s2 = 0;}
    00020
    00021         word16 m_s1, m_s2;
    00022 };
    00023
    00024 NAMESPACE_END
    00025
    00026 #endif