14#define HashWordPtr(x) ((HashWordType*)(void*)(x))
15#define ConstHashWordPtr(x) ((const HashWordType*)(const void*)(x))
24 static std::string StaticAlgorithmName() {
return std::string(
"MDC/")+B::StaticAlgorithmName();}
37 typedef typename H::HashWordType HashWordType;
40 void UncheckedSetKey(
const byte *userKey,
unsigned int length,
const NameValuePairs ¶ms)
42 CRYPTOPP_UNUSED(params);
43 this->AssertValidKeyLength(length);
47 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const
50 H::Transform(Buffer(),
Key());
63 bool IsPermutation()
const {
return false;}
65 unsigned int OptimalDataAlignment()
const {
return sizeof(HashWordType);}
68 HashWordType *
Key() {
return HashWordPtr(m_key.data());}
69 const HashWordType *
Key()
const {
return ConstHashWordPtr(m_key.data());}
70 HashWordType *Buffer()
const {
return HashWordPtr(m_buffer.data());}
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Inherited by algorithms with fixed block size.
static const int BLOCKSIZE
The block size of the algorithm provided as a constant.
Inherited by keyed algorithms with fixed key length.
static const int KEYLENGTH
The default key length used by the algorithm provided as a constant.
Fixed size stack-based SecBlock.
Interface for retrieving values given their names.
@ BIG_ENDIAN_ORDER
byte order is big-endian
Utility functions for the Crypto++ library.
T ConditionalByteReverse(ByteOrder order, T value)
Reverses bytes in a value depending upon endianness.
CRYPTOPP_DLL void xorbuf(byte *buf, const byte *mask, size_t count)
Performs an XOR of a buffer with a mask.
Crypto++ library namespace.
const char * Key()
ConstByteArrayParameter.
Classes and functions for secure memory allocations.
Classes and functions for implementing secret key algorithms.
MDC_Info cipher information.