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());}
MDC_Info cipher information.
Inherited by keyed algorithms with fixed key length.
Utility functions for the Crypto++ library.
static const int KEYLENGTH
The default key length used by the algorithm provided as a constant.
Classes and functions for secure memory allocations.
Inherited by algorithms with fixed block size.
Classes and functions for implementing secret key algorithms.
T ConditionalByteReverse(ByteOrder order, T value)
Reverses bytes in a value depending upon endianness.
Fixed size stack-based SecBlock.
void xorbuf(byte *buf, const byte *mask, size_t count)
Performs an XOR of a buffer with a mask.
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Crypto++ library namespace.
static const int BLOCKSIZE
The block size of the algorithm provided as a constant.
const char * Key()
ConstByteArrayParameter.
Interface for retrieving values given their names.