- Main Page
- Namespaces
- Classes
- Files

- File List
- 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         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
    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