libdecaf
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
decaf::SHA512 Class Reference

SHA512 wrapper function. More...

Inheritance diagram for decaf::SHA512:
decaf::EdDSA< Ristretto >::Prehash

Public Member Functions

 SHA512 () DECAF_NOEXCEPT
 Constructor.
 
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...
 
SHA512operator<< (const Block &s)
 Add more data, stream version. More...
 
SHA512operator+= (const Block &s)
 Same as <<. More...
 
void final (Buffer b)
 Output bytes from the SHA context, and resets it. More...
 
void reset () DECAF_NOEXCEPT
 Resets the SHA context.
 
SecureBuffer final (size_t len=OUTPUT_BYTES)
 Output bytes from the sponge. 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...
 
 ~SHA512 () DECAF_NOEXCEPT
 Destructor zeroizes state.
 

Static Public Member Functions

static SecureBuffer hash (const Block &message, size_t outlen=OUTPUT_BYTES)
 Hash a message in one pass.
 

Static Public Attributes

static const size_t OUTPUT_BYTES = 64
 Number of bytes ouf output.
 
static const size_t MAX_OUTPUT_BYTES = OUTPUT_BYTES
 Number of bytes of output.
 
static const size_t DEFAULT_OUTPUT_BYTES = OUTPUT_BYTES
 Default number of bytes to output.
 

Detailed Description

SHA512 wrapper function.

Member Function Documentation

◆ default_output_size()

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

Return the sponge's default output size.

◆ final() [1/2]

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

Output bytes from the SHA context, and resets it.

◆ final() [2/2]

SecureBuffer decaf::SHA512::final ( size_t  len = OUTPUT_BYTES)
inline

Output bytes from the sponge.

◆ max_output_size()

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

Return the sponge's maximum output size.

◆ operator+=()

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

Same as <<.

◆ operator<<()

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

Add more data, stream version.

◆ update()

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

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


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