From 05845587a5a0454273fbb0cc48f8b01724c61f65 Mon Sep 17 00:00:00 2001 From: weidai Date: Mon, 25 Dec 2006 08:03:32 +0000 Subject: [PATCH] adding missing AlgorithmName() --- adler32.h | 1 + crc.h | 1 + 2 files changed, 2 insertions(+) diff --git a/adler32.h b/adler32.h index bff6b35e..1cc90ce6 100644 --- a/adler32.h +++ b/adler32.h @@ -14,6 +14,7 @@ public: void Update(const byte *input, size_t length); void TruncatedFinal(byte *hash, size_t size); unsigned int DigestSize() const {return DIGESTSIZE;} + std::string AlgorithmName() const {return "Adler32";} private: void Reset() {m_s1 = 1; m_s2 = 0;} diff --git a/crc.h b/crc.h index 23f14618..1cacf5b5 100644 --- a/crc.h +++ b/crc.h @@ -24,6 +24,7 @@ public: void Update(const byte *input, size_t length); void TruncatedFinal(byte *hash, size_t size); unsigned int DigestSize() const {return DIGESTSIZE;} + std::string AlgorithmName() const {return "CRC32";} void UpdateByte(byte b) {m_crc = m_tab[CRC32_INDEX(m_crc) ^ b] ^ CRC32_SHIFTED(m_crc);} byte GetCrcByte(size_t i) const {return ((byte *)&(m_crc))[i];}