13#ifndef CRYPTOPP_SHAKE_H
14#define CRYPTOPP_SHAKE_H
40 SHAKE(
unsigned int digestSize) : m_digestSize(digestSize) {Restart();}
46 void Update(
const byte *input,
size_t length);
48 void TruncatedFinal(
byte *hash,
size_t size);
51 inline unsigned int r()
const {
return BlockSize();}
56 void ThrowIfInvalidTruncatedSize(
size_t size)
const;
59 unsigned int m_digestSize, m_counter;
65template<
unsigned int T_Strength>
69 CRYPTOPP_CONSTANT(DIGESTSIZE = (T_Strength == 128 ? 32 : 64));
70 CRYPTOPP_CONSTANT(BLOCKSIZE = (T_Strength == 128 ? 1344/8 : 1088/8));
71 static std::string StaticAlgorithmName()
88 unsigned int BlockSize()
const {
return BLOCKSIZE; }
93#if !defined(__BORLANDC__)
SHAKE128(unsigned int outputSize)
Construct a SHAKE128 message digest.
SHAKE128()
Construct a SHAKE128 message digest.
SHAKE256(unsigned int outputSize)
Construct a SHAKE256 message digest.
SHAKE256()
Construct a SHAKE256 message digest.
SHAKE message digest template.
unsigned int BlockSize() const
Provides the block size of the compression function.
SHAKE_Final(unsigned int outputSize=DIGESTSIZE)
Construct a SHAKE-X message digest.
std::string AlgorithmName() const
Provides the name of this algorithm.
SHAKE message digest base class.
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
unsigned int DigestSize() const
Provides the digest size of the hash.
Abstract base classes that provide a uniform interface to this library.
#define CRYPTOPP_COMPILE_ASSERT(expr)
Compile time assertion.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
Crypto++ library namespace.
const char * BlockSize()
int, in bytes
Classes and functions for secure memory allocations.