16#ifndef CRYPTOPP_CMAC_WIDE_BLOCK_CIPHERS
17# define CRYPTOPP_CMAC_WIDE_BLOCK_CIPHERS 1
20NAMESPACE_BEGIN(CryptoPP)
31 void UncheckedSetKey(
const byte *key,
unsigned int length,
const NameValuePairs ¶ms);
32 void Update(
const byte *input,
size_t length);
33 void TruncatedFinal(
byte *mac,
size_t size);
34 unsigned int DigestSize()
const {
return GetCipher().BlockSize();}
47 unsigned int m_counter;
65 {this->SetKey(key, length);}
67 static std::string StaticAlgorithmName() {
return std::string(
"CMAC(") + T::StaticAlgorithmName() +
")";}
71 typename T::Encryption m_cipher;
Interface for one direction (encryption or decryption) of a block cipher.
CMAC base implementation.
std::string AlgorithmProvider() const
Retrieve the provider of this algorithm.
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
unsigned int OptimalBlockSize() const
Provides the input block size most efficient for this hash.
unsigned int DigestSize() const
CMAC message authentication code.
CMAC(const byte *key, size_t length=SameKeyLengthAs< T >::DEFAULT_KEYLENGTH)
Construct a CMAC.
EAX block cipher base implementation.
Interface for message authentication codes.
Provides a base implementation of Algorithm and SimpleKeyingInterface for message authentication code...
Interface for retrieving values given their names.
Provides key lengths based on another class's key length.
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.