DMAC< T > Class Template Reference

#include <dmac.h>

Inheritance diagram for DMAC< T >:

MessageAuthenticationCodeFinal< DMAC_Base< T > > ClonableImpl< MessageAuthenticationCodeFinal< DMAC_Base< T > >, MessageAuthenticationCodeImpl< DMAC_Base< T > > > MessageAuthenticationCodeImpl< DMAC_Base< T > > AlgorithmImpl< SimpleKeyingInterfaceImpl< DMAC_Base< T >, DMAC_Base< T > >, DMAC_Base< T > > SimpleKeyingInterfaceImpl< DMAC_Base< T >, DMAC_Base< T > > DMAC_Base< T > SameKeyLengthAs< T > MessageAuthenticationCode HashTransformation SimpleKeyingInterface Algorithm Clonable List of all members.

Detailed Description

template<class T>
class DMAC< T >

DMAC.

Based on "CBC MAC for Real-Time Data Sources" by Erez Petrank and Charles Rackoff. T should be a class derived from BlockCipherDocumentation.

Definition at line 39 of file dmac.h.

Public Types

enum  { DIGESTSIZE = T::BLOCKSIZE }
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

 DMAC ()
 DMAC (const byte *key, size_t length=DMAC_Base< T >::DEFAULT_KEYLENGTH)
ClonableClone () const
 this is not implemented by most classes yet
void SetKey (const byte *key, size_t length, const NameValuePairs &params=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())
DMAC_Base< T >::IV_Requirement IVRequirement () const
 returns the minimal requirement for secure IVs
void CheckedSetKey (void *, Empty empty, const byte *key, size_t length, const NameValuePairs &params)
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 __cdecl StaticAlgorithmName ()
static size_t __cdecl StaticGetValidKeyLength (size_t keylength)

Protected Member Functions

void AssertValidKeyLength (size_t length)


Member Function Documentation

void MessageAuthenticationCodeImpl< DMAC_Base< T > , DMAC_Base< 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 DMAC< T >::DMAC().


The documentation for this class was generated from the following file:
Generated on Thu Nov 23 15:58:21 2006 for Crypto++ by  doxygen 1.5.1-p1