19 static std::string StaticAlgorithmName() {
return std::string(
"MDC/")+T::StaticAlgorithmName();}
29 typedef typename T::HashWordType HashWordType;
32 void UncheckedSetKey(
const byte *userKey,
unsigned int length,
const NameValuePairs ¶ms)
34 this->AssertValidKeyLength(length);
39 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock, byte *outBlock)
const 41 T::CorrectEndianess(Buffer(), (HashWordType *)inBlock, this->
BLOCKSIZE);
42 T::Transform(Buffer(),
Key());
45 T::CorrectEndianess(Buffer(), Buffer(), this->
BLOCKSIZE);
49 T::CorrectEndianess((HashWordType *)outBlock, Buffer(), this->
BLOCKSIZE);
52 bool IsPermutation()
const {
return false;}
54 unsigned int OptimalDataAlignment()
const {
return sizeof(HashWordType);}
57 HashWordType *
Key() {
return (HashWordType *)m_key.data();}
58 const HashWordType *
Key()
const {
return (
const HashWordType *)m_key.data();}
59 HashWordType *Buffer()
const {
return (HashWordType *)m_buffer.data();}
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 cipher provided as a constant.
void memcpy_s(void *dest, size_t sizeInBytes, const void *src, size_t count)
Bounds checking replacement for memcpy()
Classes and functions for secure memory allocations.
BlockCipherFinal< ENCRYPTION, Enc > Encryption
use BlockCipher interface
Inherited by block ciphers with fixed block size.
Classes and functions for implementing secret key algorithms.
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 class member functions to access BlockCipher constants.
Crypto++ library namespace.
static const int BLOCKSIZE
The block size of the cipher provided as a constant.
const char * Key()
ConstByteArrayParameter.
Interface for retrieving values given their names.