6 #ifndef CRYPTOPP_HMAC_H 7 #define CRYPTOPP_HMAC_H 19 void UncheckedSetKey(
const byte *userKey,
unsigned int keylength,
const NameValuePairs ¶ms);
22 void Update(
const byte *input,
size_t length);
23 void TruncatedFinal(byte *mac,
size_t size);
29 byte * AccessIpad() {
return m_buf;}
30 byte * AccessOpad() {
return m_buf + AccessHash().
BlockSize();}
31 byte * AccessInnerHash() {
return m_buf + 2*AccessHash().BlockSize();}
37 bool m_innerHashKeyed;
46 CRYPTOPP_CONSTANT(DIGESTSIZE=T::DIGESTSIZE)
47 CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE)
51 {this->
SetKey(key, length);}
53 static std::string StaticAlgorithmName() {
return std::string(
"HMAC(") + T::StaticAlgorithmName() +
")";}
54 std::string
AlgorithmName()
const {
return std::string(
"HMAC(") + m_hash.AlgorithmName() +
")";}
Interface for message authentication codes.
virtual void SetKey(const byte *key, size_t length, const NameValuePairs ¶ms=g_nullNameValuePairs)
Sets or reset the key of this object.
SecByteBlock is a SecBlock<byte> typedef.
Classes and functions for secure memory allocations.
unsigned int DigestSize() const
Provides the digest size of the hash.
Classes and functions for implementing secret key algorithms.
static const int DEFAULT_KEYLENGTH
The default key length used by the cipher provided as a constant.
Provides class member functions to access MessageAuthenticationCode constants.
Inherited by keyed algorithms with variable key length.
Crypto++ library namespace.
std::string AlgorithmName() const
Provides the name of this algorithm.
Interface for retrieving values given their names.
unsigned int OptimalBlockSize() const
Provides the input block size most efficient for this hash.