27 void Update(
const byte *input,
size_t length);
34 byte * AccessIpad() {
return m_buf;}
35 byte * AccessOpad() {
return m_buf + AccessHash().
BlockSize();}
36 byte * AccessInnerHash() {
return m_buf + 2*AccessHash().BlockSize();}
42 bool m_innerHashKeyed;
55 CRYPTOPP_CONSTANT(DIGESTSIZE=T::DIGESTSIZE);
56 CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE);
66 {this->SetKey(key, length);}
68 static std::string StaticAlgorithmName() {
return std::string(
"HMAC(") + T::StaticAlgorithmName() +
")";}
69 std::string AlgorithmName()
const {
return std::string(
"HMAC(") + m_hash.AlgorithmName() +
")";}
70 std::string AlgorithmProvider()
const {
return m_hash.AlgorithmProvider();}
unsigned int OptimalBlockSize() const
Provides the input block size most efficient for this hash.
void UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs ¶ms)
Sets the key for this object without performing parameter validation.
void TruncatedFinal(byte *mac, size_t size)
Computes the hash of the current message.
void Restart()
Restart the hash.
HMAC_Base()
Construct a HMAC_Base.
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.
HMAC(const byte *key, size_t length=HMAC_Base::DEFAULT_KEYLENGTH)
Construct a HMAC.
Interface for message authentication codes.
Provides a base implementation of Algorithm and SimpleKeyingInterface for message authentication code...
Interface for retrieving values given their names.
Inherited by keyed algorithms with variable key length.
static const int DEFAULT_KEYLENGTH
The default key length used by the algorithm provided as a constant.
Crypto++ library namespace.
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.