#include <cbcmac.h>
Inheritance diagram for CBC_MAC< T >:
Compatible with FIPS 113. T should be a class derived from BlockCipherDocumentation. Secure only for fixed length messages. For variable length messages use DMAC.
Definition at line 35 of file cbcmac.h.
Public Types | |
enum | { MIN_KEYLENGTH = T::MIN_KEYLENGTH, MAX_KEYLENGTH = T::MAX_KEYLENGTH, DEFAULT_KEYLENGTH = T::DEFAULT_KEYLENGTH } |
enum | { IV_REQUIREMENT = T::IV_REQUIREMENT } |
Public Member Functions | |
CBC_MAC () | |
CBC_MAC (const byte *key, size_t length=SameKeyLengthAs< T >::DEFAULT_KEYLENGTH) | |
void | SetKey (const byte *key, size_t length, const NameValuePairs ¶ms=g_nullNameValuePairs) |
set or reset the key of this object | |
std::string | AlgorithmName () const |
returns name of this algorithm, not universally implemented yet | |
size_t | MinKeyLength () const |
returns smallest valid key length in bytes */ | |
size_t | MaxKeyLength () const |
returns largest valid key length in bytes */ | |
size_t | DefaultKeyLength () const |
returns default (recommended) key length in bytes */ | |
size_t | GetValidKeyLength (size_t n) const |
returns the smallest valid key length in bytes that is >= min(n, GetMaxKeyLength()) | |
CBC_MAC_Base::IV_Requirement | IVRequirement () const |
returns the minimal requirement for secure IVs | |
void | CheckedSetKey (void *, Empty empty, const byte *key, size_t length, const NameValuePairs ¶ms) |
void | Update (const byte *input, size_t length) |
process more input | |
void | TruncatedFinal (byte *mac, size_t size) |
truncated version of Final() | |
unsigned int | DigestSize () const |
size of the hash returned by Final() | |
Static Public Member Functions | |
static std::string | StaticAlgorithmName () |
static size_t __cdecl | StaticGetValidKeyLength (size_t keylength) |
Protected Member Functions | |
void | AssertValidKeyLength (size_t length) |
void MessageAuthenticationCodeImpl< CBC_MAC_Base , CBC_MAC< T > >::SetKey | ( | const byte * | key, | |
size_t | length, | |||
const NameValuePairs & | params = g_nullNameValuePairs | |||
) | [inline, virtual, inherited] |
Implements SimpleKeyingInterface.
Definition at line 188 of file seckey.h.
Referenced by CBC_MAC< T >::CBC_MAC().