dice-hash
Hash function for stl types and container
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
dice::hash::blake3::Blake3< OutputExtent > Struct Template Reference

Public Member Functions

 Blake3 (std::span< std::byte const, default_key_extent > key) noexcept
 Construct a BLAKE3 instance.
 
void digest (std::span< std::byte const > data) noexcept
 digests data into the underlying BLAKE2Xb state
 
void finish (std::span< std::byte, output_extent > out) &&noexcept
 produces the hash corresponding to the previously digested bytes
 

Static Public Member Functions

static void hash_single (std::span< std::byte const > data, std::span< std::byte, output_extent > out) noexcept
 convenience function to hash a single byte-span
 
static void hash_single (std::span< std::byte const > data, std::span< std::byte, output_extent > out, std::span< std::byte const, default_key_extent > key) noexcept
 convenience function to hash a single byte-span
 

Static Public Attributes

static constexpr size_t output_extent = OutputExtent
 if known at compile time, the size of the resulting hash, otherwise dynamic_output_extent
 
static constexpr size_t min_key_extent = ::dice::hash::blake3::min_key_extent
 
static constexpr size_t max_key_extent = ::dice::hash::blake3::max_key_extent
 
static constexpr size_t default_key_extent = ::dice::hash::blake3::default_key_extent
 

Constructor & Destructor Documentation

◆ Blake3()

template<size_t OutputExtent = dynamic_output_extent>
dice::hash::blake3::Blake3< OutputExtent >::Blake3 ( std::span< std::byte const, default_key_extent >  key)
inlineexplicitnoexcept

Construct a BLAKE3 instance.

Parameters
keya blake3 key

Member Function Documentation

◆ finish()

template<size_t OutputExtent = dynamic_output_extent>
void dice::hash::blake3::Blake3< OutputExtent >::finish ( std::span< std::byte, output_extent out) &&
inlinenoexcept

produces the hash corresponding to the previously digested bytes

Parameters
outlocation to write the hash to, if output_extent == dynamic_output_extent and the output length was specified on construction the length of the span has to match the previously provided length

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