1#ifndef CRYPTOPP_TRUNHASH_H
2#define CRYPTOPP_TRUNHASH_H
11 void Update(
const byte *input,
size_t length)
12 {CRYPTOPP_UNUSED(input);CRYPTOPP_UNUSED(length);}
16 {CRYPTOPP_UNUSED(digest);CRYPTOPP_UNUSED(digestSize);}
18 {CRYPTOPP_UNUSED(digest);CRYPTOPP_UNUSED(digestLength);
return true;}
27 : m_hm(hm), m_digestSize(digestSize) {}
29 : m_hm(key, keyLength), m_digestSize(digestSize) {}
31 : m_digestSize(digestSize) {}
35 void Update(
const byte *input,
size_t length)
36 {m_hm.Update(input, length);}
39 {m_hm.TruncatedFinal(digest, digestSize);}
41 {
return m_hm.TruncatedVerify(digest, digestLength);}
45 unsigned int m_digestSize;
unsigned int DigestSize() const
Provides the digest size of the hash.
bool TruncatedVerify(const byte *digest, size_t digestLength)
Verifies the hash of the current message.
void TruncatedFinal(byte *digest, size_t digestSize)
Computes the hash of the current message.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
construct new HashModule with smaller DigestSize() from existing one
void Restart()
Restart the hash.
unsigned int DigestSize() const
Provides the digest size of the hash.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
void TruncatedFinal(byte *digest, size_t digestSize)
Computes the hash of the current message.
bool TruncatedVerify(const byte *digest, size_t digestLength)
Verifies the hash of the current message.
Abstract base classes that provide a uniform interface to this library.
Crypto++ library namespace.