1 #ifndef CRYPTOPP_CMAC_H
2 #define CRYPTOPP_CMAC_H
7 NAMESPACE_BEGIN(CryptoPP)
15 void UncheckedSetKey(
const byte *key,
unsigned int length,
const NameValuePairs ¶ms);
16 void Update(
const byte *input,
size_t length);
17 void TruncatedFinal(byte *mac,
size_t size);
18 unsigned int DigestSize()
const {
return GetCipher().BlockSize();}
30 unsigned int m_counter;
41 {this->
SetKey(key, length);}
43 static std::string StaticAlgorithmName() {
return std::string(
"CMAC(") + T::StaticAlgorithmName() +
")";}
47 typename T::Encryption m_cipher;
interface for message authentication codes
virtual void SetKey(const byte *key, size_t length, const NameValuePairs ¶ms=g_nullNameValuePairs)
set or reset the key of this object
interface for one direction (encryption or decryption) of a block cipher
support query of key length that's the same as another class
unsigned int OptimalBlockSize() const
input to Update() should have length a multiple of this for optimal speed
unsigned int OptimalDataAlignment() const
returns how input should be aligned for optimal performance
unsigned int DigestSize() const
size of the hash/digest/MAC returned by Final()
interface for retrieving values given their names