libdecaf
Public Member Functions | List of all members
decaf::KeccakHash Class Reference

Hash function derived from Keccak FUTURE: throw ProtocolException when hash is misused by calling update() after output(). More...

Inheritance diagram for decaf::KeccakHash:
decaf::SHA3< bits > decaf::SHAKE< bits > decaf::SHAKE< 256 > decaf::EdDSA< Ed448Goldilocks >::Prehash

Public Member Functions

void update (const uint8_t *__restrict__ in, size_t len) DECAF_NOEXCEPT
 Add more data to running hash.
 
void update (const Block &s) DECAF_NOEXCEPT
 Add more data to running hash, C++ version. More...
 
KeccakHashoperator<< (const Block &s) DECAF_NOEXCEPT
 Add more data, stream version. More...
 
KeccakHashoperator+= (const Block &s) DECAF_NOEXCEPT
 Same as <<. More...
 
SecureBuffer output (size_t len)
 Output bytes from the sponge. More...
 
SecureBuffer final (size_t len)
 Output bytes from the sponge. More...
 
void output (Buffer b)
 Output bytes from the sponge. More...
 
void final (Buffer b)
 Output bytes from the sponge and reinitialize it. More...
 
size_t default_output_size () const DECAF_NOEXCEPT
 Return the sponge's default output size. More...
 
size_t max_output_size () const DECAF_NOEXCEPT
 Return the sponge's maximum output size. More...
 
SecureBuffer output ()
 Output the default number of bytes. More...
 
SecureBuffer final ()
 Output the default number of bytes, and reset hash. More...
 
void reset () DECAF_NOEXCEPT
 Reset the hash to the empty string.
 
 ~KeccakHash () DECAF_NOEXCEPT
 Destructor zeroizes state.
 

Detailed Description

Hash function derived from Keccak FUTURE: throw ProtocolException when hash is misused by calling update() after output().

Member Function Documentation

◆ default_output_size()

size_t decaf::KeccakHash::default_output_size ( ) const
inline

Return the sponge's default output size.

◆ final() [1/3]

SecureBuffer decaf::KeccakHash::final ( size_t  len)
inline

Output bytes from the sponge.

◆ final() [2/3]

void decaf::KeccakHash::final ( Buffer  b)
inline

Output bytes from the sponge and reinitialize it.

Throw LengthException if you've output too many bytes from a SHA3 instance.

◆ final() [3/3]

SecureBuffer decaf::KeccakHash::final ( )
inline

Output the default number of bytes, and reset hash.

◆ max_output_size()

size_t decaf::KeccakHash::max_output_size ( ) const
inline

Return the sponge's maximum output size.

◆ operator+=()

KeccakHash& decaf::KeccakHash::operator+= ( const Block s)
inline

Same as <<.

◆ operator<<()

KeccakHash& decaf::KeccakHash::operator<< ( const Block s)
inline

Add more data, stream version.

◆ output() [1/3]

SecureBuffer decaf::KeccakHash::output ( size_t  len)
inline

Output bytes from the sponge.

◆ output() [2/3]

void decaf::KeccakHash::output ( Buffer  b)
inline

Output bytes from the sponge.

Throw LengthException if you've output too many bytes from a SHA-3 instance.

◆ output() [3/3]

SecureBuffer decaf::KeccakHash::output ( )
inline

Output the default number of bytes.

◆ update()

void decaf::KeccakHash::update ( const Block s)
inline

Add more data to running hash, C++ version.


The documentation for this class was generated from the following file: