13#ifndef CRYPTOPP_SHAKE_H
14#define CRYPTOPP_SHAKE_H
19NAMESPACE_BEGIN(CryptoPP)
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__)
95 CRYPTOPP_COMPILE_ASSERT(BLOCKSIZE < 200);
Fixed size stack-based SecBlock.
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.
SHAKE(unsigned int digestSize)
Construct a SHAKE.
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
unsigned int DigestSize() const
Abstract base classes that provide a uniform interface to this library.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
Classes and functions for secure memory allocations.