8 #ifndef CRYPTOPP_AUTHENC_H 9 #define CRYPTOPP_AUTHENC_H 23 m_totalHeaderLength(0), m_totalMessageLength(0), m_totalFooterLength(0) {}
37 void Restart() {
if (m_state > State_KeySet) m_state = State_KeySet;}
38 void Resynchronize(
const byte *iv,
int length=-1);
39 void Update(
const byte *input,
size_t length);
40 void ProcessData(
byte *outString,
const byte *inString,
size_t length);
41 void TruncatedFinal(
byte *mac,
size_t macSize);
44 void AuthenticateData(
const byte *
data,
size_t len);
48 virtual bool AuthenticationIsOnPlaintext()
const =0;
49 virtual unsigned int AuthenticationBlockSize()
const =0;
50 virtual void SetKeyWithoutResync(
const byte *userKey,
size_t keylength,
const NameValuePairs ¶ms) =0;
51 virtual void Resync(
const byte *iv,
size_t len) =0;
52 virtual size_t AuthenticateBlocks(
const byte *data,
size_t len) =0;
53 virtual void AuthenticateLastHeaderBlock() =0;
55 virtual void AuthenticateLastFooterBlock(
byte *mac,
size_t macSize) =0;
57 enum State {
State_Start, State_KeySet, State_IVSet, State_AuthUntransformed, State_AuthTransformed, State_AuthFooter};
void UncheckedSetKey(const byte *key, unsigned int length, const CryptoPP::NameValuePairs ¶ms)
Sets the key for this object without performing parameter validation.
Interface for one direction (encryption or decryption) of a stream cipher or block cipher mode with a...
#define NAMESPACE_BEGIN(x)
const SymmetricCipher & GetSymmetricCipher() const
Abstract base classes that provide a uniform interface to this library.
AlignedSecByteBlock m_buffer
bool IsRandomAccess() const
Determines whether the cipher supports random access.
void Restart()
Restart the hash.
Classes and functions for secure memory allocations.
unsigned int m_bufferedDataLength
Interface for one direction (encryption or decryption) of a stream cipher or cipher mode...
Base implementation for one direction (encryption or decryption) of a stream cipher or block cipher m...
#define CRYPTOPP_ASSERT(exp)
#define CRYPTOPP_NO_VTABLE
AuthenticatedSymmetricCipherBase()
bool IsSelfInverting() const
Determines whether the cipher is self-inverting.
virtual void AuthenticateLastConfidentialBlock()
#define CRYPTOPP_UNUSED(x)
lword m_totalMessageLength
Interface for retrieving values given their names.