6 #ifndef CRYPTOPP_PANAMA_H 7 #define CRYPTOPP_PANAMA_H 19 #define CRYPTOPP_DISABLE_PANAMA_ASM 1 29 std::string AlgorithmProvider()
const;
35 CRYPTOPP_CONSTANT(STAGES = 32);
43 template <
class B = LittleEndian>
47 CRYPTOPP_CONSTANT(DIGESTSIZE = 32);
52 CRYPTOPP_STATIC_CONSTEXPR
const char* StaticAlgorithmName() {
return B::ToEnum() ==
BIG_ENDIAN_ORDER ?
"Panama-BE" :
"Panama-LE";}
57 void HashEndianCorrectedBlock(
const word32 *data) {this->Iterate(1, data);}
58 size_t HashMultipleBlocks(
const word32 *input,
size_t length);
59 word32* StateBuf() {
return NULLPTR;}
66 template <
class T_Hash,
class T_Info = T_Hash>
70 void UncheckedSetKey(
const byte *key,
unsigned int length,
const NameValuePairs ¶ms)
72 CRYPTOPP_UNUSED(params);
84 void Update(
const byte *input,
size_t length)
88 m_hash.Update(input, length);
91 void TruncatedFinal(
byte *digest,
size_t digestSize)
95 m_hash.TruncatedFinal(digest, digestSize);
99 unsigned int DigestSize()
const 100 {
return m_hash.DigestSize();}
101 unsigned int BlockSize()
const 102 {
return m_hash.BlockSize();}
103 unsigned int OptimalBlockSize()
const 104 {
return m_hash.OptimalBlockSize();}
105 unsigned int OptimalDataAlignment()
const 106 {
return m_hash.OptimalDataAlignment();}
111 m_hash.Update(m_key, m_key.
size());
122 template <
class B = LittleEndian>
128 {this->SetKey(key, length);}
136 CRYPTOPP_STATIC_CONSTEXPR
const char* StaticAlgorithmName() {
return B::ToEnum() ==
BIG_ENDIAN_ORDER ?
"Panama-BE" :
"Panama-LE";}
147 std::string AlgorithmProvider()
const;
150 bool CipherIsRandomAccess()
const {
return false;}
151 void CipherResynchronize(
byte *keystreamBuffer,
const byte *iv,
size_t length);
152 unsigned int GetAlignment()
const;
160 template <
class B = LittleEndian>
Inherited by keyed algorithms with fixed key length.
Base class for additive stream ciphers.
unsigned int word32
32-bit unsigned datatype
Wirte the keystream to the output buffer, input is NULL.
Classes and functions for secure memory allocations.
Base classes for iterated hashes.
void Assign(const T *ptr, size_type len)
Set contents and size from an array.
unsigned int DigestSize() const
Provides the digest size of the hash.
Panama message authentication code.
MAC construction using a hermetic hash function.
std::string AlgorithmProvider() const
Retrieve the provider of this algorithm.
Classes for implementing stream ciphers.
Provides Encryption and Decryption typedefs used by derived classes to implement a symmetric cipher...
unsigned char byte
8-bit unsigned datatype
Panama stream cipher operation.
Panama stream cipher information.
KeystreamOperation
Keystream operation flags.
Crypto++ library namespace.
void TruncatedFinal(byte *hash, size_t size)
Computes the hash of the current message.
SymmetricCipher implementation.
size_type size() const
Provides the count of elements in the SecBlock.
Namespace containing weak and wounded algorithms.
Interface for retrieving values given their names.