5 #ifndef CRYPTOPP_IMPORTS 11 static
void MulU(
byte *k,
unsigned int length)
15 for (
int i=length-1; i>=1; i-=2)
17 byte carry2 = k[i] >> 7;
20 k[i-1] += k[i-1] + carry2;
46 unsigned int blockSize = cipher.
BlockSize();
48 cipher.
SetKey(key, length, params);
53 MulU(
m_reg+blockSize, blockSize);
55 MulU(
m_reg+2*blockSize, blockSize);
65 unsigned int blockSize = cipher.
BlockSize();
85 if (length > blockSize)
89 input += (length - leftOver);
108 unsigned int blockSize = cipher.
BlockSize();
121 memset(
m_reg, 0, blockSize);
An invalid argument was detected.
virtual void SetKey(const byte *key, size_t length, const NameValuePairs ¶ms=g_nullNameValuePairs)
Sets or reset the key of this object.
void CleanNew(size_type newSize)
Change size without preserving contents.
#define NAMESPACE_BEGIN(x)
Classes for CMAC message authentication code.
Interface for one direction (encryption or decryption) of a block cipher.
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms)
Sets the key for this object without performing parameter validation.
const T1 UnsignedMin(const T1 &a, const T2 &b)
Safe comparison of values that could be neagtive and incorrectly promoted.
#define CRYPTOPP_ASSERT(exp)
void xorbuf(byte *buf, const byte *mask, size_t count)
Performs an XOR of a buffer with a mask.
uint8_t const size_t const size
void * memcpy(void *a, const void *b, size_t c)
virtual BlockCipher & AccessCipher()=0
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
void TruncatedFinal(byte *mac, size_t size)
Computes the hash of the current message.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
Interface for retrieving values given their names.