adding missing AlgorithmName()

This commit is contained in:
weidai 2006-12-25 08:03:32 +00:00
parent b696b90551
commit 05845587a5
2 changed files with 2 additions and 0 deletions

View File

@ -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;}

1
crc.h
View File

@ -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];}