12 #ifndef CRYPTOPP_KECCAK_H 13 #define CRYPTOPP_KECCAK_H 49 Keccak(
unsigned int digestSize) : m_digestSize(digestSize) {Restart();}
52 CRYPTOPP_STATIC_CONSTEXPR
const char* StaticAlgorithmName() {
return "Keccak"; }
55 void Update(
const byte *input,
size_t length);
57 void TruncatedFinal(byte *hash,
size_t size);
62 inline unsigned int r()
const {
return 200 - 2 * m_digestSize;}
65 unsigned int m_digestSize, m_counter;
71 template<
unsigned int T_DigestSize>
75 CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize)
76 CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE)
80 static std::string StaticAlgorithmName() {
return "Keccak-" +
IntToString(DIGESTSIZE * 8); }
81 unsigned int BlockSize()
const {
return BLOCKSIZE; }
Abstract base classes that provide a uniform interface to this library.
Keccak_Final< 64 > Keccak_512
Keccak-512 message digest.
unsigned int DigestSize() const
Provides the digest size of the hash.
Keccak_Final< 28 > Keccak_224
Keccak-224 message digest.
Classes and functions for secure memory allocations.
std::string AlgorithmName() const
Provides the name of this algorithm.
#define CRYPTOPP_COMPILE_ASSERT(expr)
Compile time assertion.
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
unsigned int BlockSize() const
Provides the block size of the compression function.
Keccak(unsigned int digestSize)
Construct a Keccak.
Keccak message digest base class.
Keccak_Final< 48 > Keccak_384
Keccak-384 message digest.
Keccak_Final< 32 > Keccak_256
Keccak-256 message digest.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
Keccak message digest template.
Crypto++ library namespace.