Crypto++
8.6
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
20 #ifndef CRYPTOPP_AUTHENC_H
21 #define CRYPTOPP_AUTHENC_H
44 m_totalFooterLength(0), m_bufferedDataLength(0), m_state(State_Start) {}
51 void Restart() {
if (m_state > State_KeySet) m_state = State_KeySet;}
53 void Update(
const byte *input,
size_t length);
54 void ProcessData(
byte *outString,
const byte *inString,
size_t length);
58 void UncheckedSetKey(
const byte * key,
unsigned int length,
const CryptoPP::NameValuePairs ¶ms)
59 {CRYPTOPP_UNUSED(key), CRYPTOPP_UNUSED(length), CRYPTOPP_UNUSED(params);
CRYPTOPP_ASSERT(
false);}
61 void AuthenticateData(
const byte *data,
size_t len);
66 virtual bool AuthenticationIsOnPlaintext()
const =0;
67 virtual unsigned int AuthenticationBlockSize()
const =0;
68 virtual void SetKeyWithoutResync(
const byte *userKey,
size_t keylength,
const NameValuePairs ¶ms) =0;
69 virtual void Resync(
const byte *iv,
size_t len) =0;
70 virtual size_t AuthenticateBlocks(
const byte *data,
size_t len) =0;
71 virtual void AuthenticateLastHeaderBlock() =0;
72 virtual void AuthenticateLastConfidentialBlock() {}
73 virtual void AuthenticateLastFooterBlock(
byte *mac,
size_t macSize) =0;
77 enum State {State_Start, State_KeySet, State_IVSet, State_AuthUntransformed, State_AuthTransformed, State_AuthFooter};
80 lword m_totalHeaderLength, m_totalMessageLength, m_totalFooterLength;
81 unsigned int m_bufferedDataLength;
Classes and functions for secure memory allocations.
Interface for one direction (encryption or decryption) of a stream cipher or cipher mode.
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.
void Restart()
Restart the hash.
void ProcessData(byte *outString, const byte *inString, size_t length)
Encrypt or decrypt an array of bytes.
void Resynchronize(const byte *iv, int length=-1)
Resynchronize with an IV.
bool IsRandomAccess() const
Determines whether the cipher supports random access.
bool IsSelfInverting() const
Determines whether the cipher is self-inverting.
Base class for authenticated encryption modes of operation.
void TruncatedFinal(byte *mac, size_t macSize)
Computes the hash of the current message.
word64 lword
Large word type.
void SetKey(const byte *userKey, size_t keylength, const NameValuePairs ¶ms)
Sets or reset the key of this object.
Crypto++ library namespace.
SecBlock using AllocatorWithCleanup<byte, true> typedef.
Interface for retrieving values given their names.
Abstract base classes that provide a uniform interface to this library.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
Interface for authenticated encryption modes of operation.