Fabcoin Core  0.16.2
P2P Digital Currency
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 
14 
18 {
19 public:
20  static std::string StaticAlgorithmName() {return std::string("Two-Track-MAC");}
21  CRYPTOPP_CONSTANT(DIGESTSIZE=20)
22 
23  unsigned int DigestSize() const {return DIGESTSIZE;};
24  void UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &params);
25  void TruncatedFinal(byte *mac, size_t size);
26 
27 protected:
28  static void Transform (word32 *digest, const word32 *X, bool last);
29  void HashEndianCorrectedBlock(const word32 *data) {Transform(m_digest, data, false);}
30  void Init();
31  word32* StateBuf() {return m_digest;}
32 
35 };
36 
43 
45 
46 #endif
#define DOCUMENTED_TYPEDEF(x, y)
Definition: config.h:202
Interface for message authentication codes.
Definition: cryptlib.h:1111
Inherited by keyed algorithms with fixed key length.
Definition: seckey.h:127
uint8_t byte
Definition: Common.h:57
TTMAC message authentication code information.
Definition: ttmac.h:17
#define NAMESPACE_BEGIN(x)
Definition: config.h:200
Converts an enumeration to a type suitable for use as a template parameter.
Definition: cryptlib.h:116
Provides class member functions to key a message authentication code.
Definition: seckey.h:379
Two-Track-MAC message authentication code.
Classes and functions for secure memory allocations.
FixedSizeSecBlock< word32, 10 > m_digest
Definition: ttmac.h:33
Classes and functions for implementing secret key algorithms.
#define CRYPTOPP_CONSTANT(x)
Definition: config.h:540
#define CRYPTOPP_NO_VTABLE
Definition: config.h:369
#define X(name)
Definition: net.cpp:642
uint8_t const size_t const size
Definition: sha3.h:20
void HashEndianCorrectedBlock(const word32 *data)
Definition: ttmac.h:29
Iterated hash base class.
Definition: iterhash.h:101
#define NAMESPACE_END
Definition: config.h:201
FixedSizeSecBlock< word32, 5 > m_key
Definition: ttmac.h:34
word32 * StateBuf()
Definition: ttmac.h:31
unsigned int word32
Definition: config.h:231
static std::string StaticAlgorithmName()
Definition: ttmac.h:20
uint8_t const * data
Definition: sha3.h:19
Interface for retrieving values given their names.
Definition: cryptlib.h:279