Crypto++
5.6.5
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
11 #ifndef CRYPTOPP_SHA3_H
12 #define CRYPTOPP_SHA3_H
36 SHA3(
unsigned int digestSize) : m_digestSize(digestSize) {Restart();}
39 CRYPTOPP_CONSTEXPR
static const char* StaticAlgorithmName() {
return "SHA3"; }
42 void Update(
const byte *input,
size_t length);
44 void TruncatedFinal(
byte *hash,
size_t size);
48 inline unsigned int r()
const {
return 200 - 2 * m_digestSize;}
51 unsigned int m_digestSize, m_counter;
58 template<
unsigned int T_DigestSize>
62 CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize)
63 CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE)
67 static std::string StaticAlgorithmName() {
return "SHA3-" +
IntToString(DIGESTSIZE * 8); }
68 unsigned int BlockSize()
const {
return BLOCKSIZE; }
Classes and functions for secure memory allocations.
SHA3(unsigned int digestSize)
Construct a SHA3.
#define CRYPTOPP_COMPILE_ASSERT(expr)
Compile time assertion.
SHA3-X message digest, template for more fine-grained typedefs.
std::string IntToString(T value, unsigned int base=10)
Converts a value to a string.
std::string AlgorithmName() const
Provides the name of this algorithm.
unsigned int OptimalDataAlignment() const
Provides input and output data alignment for optimal performance.
unsigned int DigestSize() const
Provides the digest size of the hash.
Crypto++ library namespace.
SHA3 message digest base class.
Abstract base classes that provide a uniform interface to this library.
unsigned int BlockSize() const
Provides the block size of the compression function.