Security Scol plugin
ttmac.h
Go to the documentation of this file.
1// ttmac.h - written and placed in the public domain by Kevin Springle
2
5
6#ifndef CRYPTOPP_TTMAC_H
7#define CRYPTOPP_TTMAC_H
8
9#include "seckey.h"
10#include "iterhash.h"
11#include "secblock.h"
12
13NAMESPACE_BEGIN(CryptoPP)
14
15
16class CRYPTOPP_NO_VTABLE TTMAC_Base : public FixedKeyLength<20>, public IteratedHash<word32, LittleEndian, 64, MessageAuthenticationCode>
17{
18public:
19 static std::string StaticAlgorithmName() {return std::string("Two-Track-MAC");}
20 CRYPTOPP_CONSTANT(DIGESTSIZE=20);
21
22 unsigned int DigestSize() const {return DIGESTSIZE;};
23 void UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &params);
24 void TruncatedFinal(byte *mac, size_t size);
25
26protected:
27 static void Transform (word32 *digest, const word32 *X, bool last);
28 void HashEndianCorrectedBlock(const word32 *data) {Transform(m_digest, data, false);}
29 void Init();
30 word32* StateBuf() {return m_digest;}
31
34};
35
41
42NAMESPACE_END
43
44#endif
Inherited by keyed algorithms with fixed key length.
Definition seckey.h:125
Fixed size stack-based SecBlock.
Definition secblock.h:1246
Iterated hash base class.
Definition iterhash.h:127
Provides class member functions to key a message authentication code.
Definition seckey.h:371
Interface for message authentication codes.
Definition cryptlib.h:1299
Interface for retrieving values given their names.
Definition cryptlib.h:322
TTMAC message authentication code information.
Definition ttmac.h:17
unsigned int word32
32-bit unsigned datatype
Definition config_int.h:62
Base classes for iterated hashes.
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.
Converts an enumeration to a type suitable for use as a template parameter.
Definition cryptlib.h:136