3 #ifndef CRYPTOPP_HMAC_H
4 #define CRYPTOPP_HMAC_H
9 NAMESPACE_BEGIN(CryptoPP)
16 void UncheckedSetKey(
const byte *userKey,
unsigned int keylength,
const NameValuePairs ¶ms);
19 void Update(
const byte *input,
size_t length);
20 void TruncatedFinal(byte *mac,
size_t size);
26 byte * AccessIpad() {
return m_buf;}
27 byte * AccessOpad() {
return m_buf + AccessHash().
BlockSize();}
28 byte * AccessInnerHash() {
return m_buf + 2*AccessHash().BlockSize();}
34 bool m_innerHashKeyed;
43 CRYPTOPP_CONSTANT(DIGESTSIZE=T::DIGESTSIZE)
44 CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE)
47 HMAC(
const byte *key,
size_t length=HMAC_Base::DEFAULT_KEYLENGTH)
48 {this->
SetKey(key, length);}
50 static std::string StaticAlgorithmName() {
return std::string(
"HMAC(") + T::StaticAlgorithmName() +
")";}
51 std::string
AlgorithmName()
const {
return std::string(
"HMAC(") + m_hash.AlgorithmName() +
")";}