6#ifndef CRYPTOPP_TRUNHASH_H
7#define CRYPTOPP_TRUNHASH_H
18 void Update(
const byte *input,
size_t length)
19 {CRYPTOPP_UNUSED(input);CRYPTOPP_UNUSED(length);}
23 {CRYPTOPP_UNUSED(digest);CRYPTOPP_UNUSED(digestSize);}
25 {CRYPTOPP_UNUSED(digest);CRYPTOPP_UNUSED(digestLength);
return true;}
36 : m_hm(hm), m_digestSize(digestSize) {}
39 : m_hm(key, keyLength), m_digestSize(digestSize) {}
42 : m_digestSize(digestSize) {}
46 void Update(
const byte *input,
size_t length)
47 {m_hm.Update(input, length);}
50 {m_hm.TruncatedFinal(digest, digestSize);}
52 {
return m_hm.TruncatedVerify(digest, digestLength);}
56 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 digest size from an existing one.
void Restart()
Restart the hash.
TruncatedHashTemplate(const byte *key, size_t keyLength, unsigned int digestSize)
Construct a TruncatedHashTemplate.
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.
TruncatedHashTemplate(size_t digestSize)
Construct a TruncatedHashTemplate.
void TruncatedFinal(byte *digest, size_t digestSize)
Computes the hash of the current message.
TruncatedHashTemplate(T hm, unsigned int digestSize)
Construct a TruncatedHashTemplate.
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.