#include <hmac.h>
Inheritance diagram for HMAC< T >:
HMAC(K, text) = H(K XOR opad, H(K XOR ipad, text))
Definition at line 41 of file hmac.h.
Public Types | |
enum | { DIGESTSIZE = T::DIGESTSIZE, BLOCKSIZE = T::BLOCKSIZE } |
enum | |
enum | |
Public Member Functions | |
HMAC () | |
HMAC (const byte *key, size_t length=HMAC_Base::DEFAULT_KEYLENGTH) | |
std::string | AlgorithmName () const |
returns name of this algorithm, not universally implemented yet | |
void | SetKey (const byte *key, size_t length, const NameValuePairs ¶ms=g_nullNameValuePairs) |
set or reset the key of this object | |
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()) | |
HMAC_Base::IV_Requirement | IVRequirement () const |
returns the minimal requirement for secure IVs | |
void | UncheckedSetKey (const byte *userKey, unsigned int keylength) |
void | Restart () |
discard the current state, and restart with a new message | |
void | Update (const byte *input, size_t length) |
process more input | |
void | TruncatedFinal (byte *mac, size_t size) |
truncated version of Final() | |
unsigned int | OptimalBlockSize () const |
input to Update() should have length a multiple of this for optimal speed | |
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 n) |
Protected Member Functions | |
void | AssertValidKeyLength (size_t length) |
void MessageAuthenticationCodeImpl< HMAC_Base , HMAC< 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 HMAC< T >::HMAC().