6 #ifndef CRYPTOPP_PANAMA_H 7 #define CRYPTOPP_PANAMA_H 14 #if CRYPTOPP_BOOL_X32 || defined(CRYPTOPP_DISABLE_INTEL_ASM) 15 # define CRYPTOPP_DISABLE_PANAMA_ASM 39 template <
class B = LittleEndian>
46 void TruncatedFinal(
byte *hash,
size_t size);
52 size_t HashMultipleBlocks(
const word32 *input,
size_t length);
59 template <
class T_Hash,
class T_Info = T_Hash>
67 m_key.Assign(key, length);
81 m_hash.Update(input, length);
88 m_hash.TruncatedFinal(digest, digestSize);
93 {
return m_hash.DigestSize();}
95 {
return m_hash.BlockSize();}
97 {
return m_hash.OptimalBlockSize();}
99 {
return m_hash.OptimalDataAlignment();}
104 m_hash.Update(m_key, m_key.size());
116 template <
class B = LittleEndian>
122 {this->SetKey(key, length);}
145 void CipherResynchronize(
byte *keystreamBuffer,
const byte *iv,
size_t length);
146 unsigned int GetAlignment()
const;
154 template <
class B = LittleEndian>
Inherited by keyed algorithms with fixed key length.
unsigned int DigestSize() const
Provides the digest size of the hash.
#define CRYPTOPP_STATIC_CONSTEXPR
Base class for additive stream ciphers.
void Update(const byte *input, size_t length)
Updates a hash with additional input.
#define NAMESPACE_BEGIN(x)
Wirte the keystream to the output buffer, input is NULL.
SymmetricCipherFinal< ConcretePolicyHolder< PanamaCipherPolicy< B >, AdditiveCipherTemplate<> >, PanamaCipherInfo< B > > Encryption
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
Classes and functions for secure memory allocations.
void HashEndianCorrectedBlock(const word32 *data)
unsigned int BlockSize() const
Provides the block size of the compression function.
void TruncatedFinal(byte *digest, size_t digestSize)
Computes the hash of the current message.
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
Fixed size stack-based SecBlock with 16-byte alignment.
Panama message authentication code.
FixedSizeSecBlock< word32, 8 > m_key
MAC construction using a hermetic hash function.
#define CRYPTOPP_CONSTANT(x)
unsigned int DigestSize() const
Provides the digest size of the hash.
unsigned int OptimalBlockSize() const
Provides the input block size most efficient for this hash.
#define CRYPTOPP_NO_VTABLE
Classes for implementing stream ciphers.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher...
Panama stream cipher operation.
CRYPTOPP_STATIC_CONSTEXPR const char * StaticAlgorithmName()
uint8_t const size_t const size
bool CipherIsRandomAccess() const
Flag indicating random access.
PanamaMAC(const byte *key, unsigned int length)
#define CRYPTOPP_UNUSED(x)
Panama stream cipher information.
KeystreamOperation
Keystream operation flags.
void Restart()
Restart the hash.
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms)
Sets the key for this object without performing parameter validation.
SymmetricCipher implementation.
Base class for additive stream ciphers with SymmetricCipher interface.
Interface for retrieving values given their names.
Base class for identifying alogorithm.