Crypto++
5.6.4
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
20 static std::string StaticAlgorithmName() {
return std::string(
"MDC/")+T::StaticAlgorithmName();}
35 typedef typename T::HashWordType HashWordType;
38 void UncheckedSetKey(
const byte *userKey,
unsigned int length,
const NameValuePairs ¶ms)
40 this->AssertValidKeyLength(length);
41 memcpy_s(m_key, m_key.size(), userKey, this->KEYLENGTH);
45 void ProcessAndXorBlock(
const byte *inBlock,
const byte *xorBlock,
byte *outBlock)
const
47 T::CorrectEndianess(Buffer(), (HashWordType *)inBlock, this->
BLOCKSIZE);
48 T::Transform(Buffer(),
Key());
51 T::CorrectEndianess(Buffer(), Buffer(), this->
BLOCKSIZE);
55 T::CorrectEndianess((HashWordType *)outBlock, Buffer(), this->
BLOCKSIZE);
58 bool IsPermutation()
const {
return false;}
60 unsigned int OptimalDataAlignment()
const {
return sizeof(HashWordType);}
63 HashWordType *
Key() {
return (HashWordType *)m_key.data();}
64 const HashWordType *
Key()
const {
return (
const HashWordType *)m_key.data();}
65 HashWordType *Buffer()
const {
return (HashWordType *)m_buffer.data();}
void xorbuf(byte *buf, const byte *mask, size_t count)
Performs an XOR of a buffer with a mask.
const char * Key()
ConstByteArrayParameter.
Classes and functions for secure memory allocations.
MDC_Info cipher information.
static const int KEYLENGTH
The default key length used by the algorithm provided as a constant.
Inherited by algorithms with fixed block size.
BlockCipherFinal< ENCRYPTION, Enc > Encryption
use BlockCipher interface
Provides a base implementation of Algorithm and SimpleKeyingInterface for block ciphers.
Inherited by keyed algorithms with fixed key length.
Utility functions for the Crypto++ library.
static const int BLOCKSIZE
The block size of the algorithm provided as a constant.
Classes and functions for implementing secret key algorithms.
Fixed size stack-based SecBlock.
Crypto++ library namespace.
void memcpy_s(void *dest, size_t sizeInBytes, const void *src, size_t count)
Bounds checking replacement for memcpy()
Interface for retrieving values given their names.