summaryrefslogtreecommitdiff
path: root/adler32.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2015-11-05 01:59:46 -0500
committerJeffrey Walton <noloader@gmail.com>2015-11-05 01:59:46 -0500
commit48809d4e85c125814425c621d8d0d89f95405924 (patch)
tree1010fd16c4b1199f3d27dd726dda241a2bd29f83 /adler32.h
parent025337a94aceb75d188149db70c2094673772816 (diff)
downloadcryptopp-git-48809d4e85c125814425c621d8d0d89f95405924.tar.gz
CRYPTOPP 5.6.3 RC6 checkin
Diffstat (limited to 'adler32.h')
-rw-r--r--adler32.h61
1 files changed, 33 insertions, 28 deletions
diff --git a/adler32.h b/adler32.h
index 0ed803da..a6da34a4 100644
--- a/adler32.h
+++ b/adler32.h
@@ -1,28 +1,33 @@
-#ifndef CRYPTOPP_ADLER32_H
-#define CRYPTOPP_ADLER32_H
-
-#include "cryptlib.h"
-
-NAMESPACE_BEGIN(CryptoPP)
-
-//! ADLER-32 checksum calculations
-class Adler32 : public HashTransformation
-{
-public:
- CRYPTOPP_CONSTANT(DIGESTSIZE = 4)
- Adler32() {Reset();}
- void Update(const byte *input, size_t length);
- void TruncatedFinal(byte *hash, size_t size);
- unsigned int DigestSize() const {return DIGESTSIZE;}
- static const char * StaticAlgorithmName() {return "Adler32";}
- std::string AlgorithmName() const {return StaticAlgorithmName();}
-
-private:
- void Reset() {m_s1 = 1; m_s2 = 0;}
-
- word16 m_s1, m_s2;
-};
-
-NAMESPACE_END
-
-#endif
+// adler32.h - written and placed in the public domain by Wei Dai
+
+//! \file
+//! \brief Class files for ADLER-32 checksum calculations
+
+#ifndef CRYPTOPP_ADLER32_H
+#define CRYPTOPP_ADLER32_H
+
+#include "cryptlib.h"
+
+NAMESPACE_BEGIN(CryptoPP)
+
+//! ADLER-32 checksum calculations
+class Adler32 : public HashTransformation
+{
+public:
+ CRYPTOPP_CONSTANT(DIGESTSIZE = 4)
+ Adler32() {Reset();}
+ void Update(const byte *input, size_t length);
+ void TruncatedFinal(byte *hash, size_t size);
+ unsigned int DigestSize() const {return DIGESTSIZE;}
+ static const char * StaticAlgorithmName() {return "Adler32";}
+ std::string AlgorithmName() const {return StaticAlgorithmName();}
+
+private:
+ void Reset() {m_s1 = 1; m_s2 = 0;}
+
+ word16 m_s1, m_s2;
+};
+
+NAMESPACE_END
+
+#endif