7 #ifndef CRYPTOPP_CMAC_H 8 #define CRYPTOPP_CMAC_H 23 void UncheckedSetKey(
const byte *key,
unsigned int length,
const NameValuePairs ¶ms);
24 void Update(
const byte *input,
size_t length);
25 void TruncatedFinal(
byte *mac,
size_t size);
26 unsigned int DigestSize()
const {
return GetCipher().BlockSize();}
56 {this->
SetKey(key, length);}
58 static std::string
StaticAlgorithmName() {
return std::string(
"CMAC(") + T::StaticAlgorithmName() +
")";}
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.
#define NAMESPACE_BEGIN(x)
EAX block cipher base implementation.
Interface for one direction (encryption or decryption) of a block cipher.
CMAC message authentication code.
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.
Provides a base implementation of Algorithm and SimpleKeyingInterface for message authentication code...
Provides key lengths based on another class's key length.
unsigned int OptimalBlockSize() const
Provides the input block size most efficient for this hash.
CMAC(const byte *key, size_t length=SameKeyLengthAs< T >::DEFAULT_KEYLENGTH)
Construct a CMAC.
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
#define CRYPTOPP_NO_VTABLE
unsigned int DigestSize() const
Provides the digest size of the hash.
uint8_t const size_t const size
static std::string StaticAlgorithmName()
CMAC base implementation.
const BlockCipher & GetCipher() const
BlockCipher & AccessCipher()
Interface for retrieving values given their names.