nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params > Class Template Reference

This will do the usual Merkle-Damgård-style strengthening, padding with a 1 bit, then 0 bits as needed, then, if requested, the length. More...

#include <block_stream_processor.hpp>

+ Collaboration diagram for nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >:

Public Types

typedef std::array< value_type, block_valuescache_type
 
typedef params_type::digest_endian endian_type
 
typedef boost::uint_t< value_bits >::least value_type
 

Public Member Functions

 block_stream_processor (accumulator_type &acc)
 
 BOOST_STATIC_ASSERT (word_bits % value_bits==0)
 
template<typename ContainerT >
void operator() (const ContainerT &c)
 
template<typename InputIterator >
void operator() (InputIterator b, InputIterator e)
 
template<typename InputIterator , typename Category >
void operator() (InputIterator b, InputIterator e, Category)
 
template<typename InputIterator >
void operator() (InputIterator b, InputIterator e, std::random_access_iterator_tag)
 
template<typename InputIterator >
void update_n (InputIterator first, InputIterator last)
 
template<typename InputIterator >
void update_n (InputIterator p, size_t n)
 
void update_one (value_type value)
 
virtual ~block_stream_processor ()
 

Static Public Attributes

constexpr static const std::size_t block_values = block_bits / value_bits
 
constexpr static const std::size_t value_bits = params_type::value_bits
 

Protected Types

typedef StateAccumulator accumulator_type
 
typedef construction_type::block_type block_type
 
typedef Construction::type construction_type
 
typedef Params params_type
 

Protected Member Functions

 BOOST_STATIC_ASSERT (block_bits % value_bits==0)
 
void process_block (std::size_t block_seen=block_bits)
 

Static Protected Attributes

constexpr static const std::size_t block_bits = construction_type::block_bits
 
constexpr static const std::size_t word_bits = construction_type::word_bits
 

Detailed Description

template<typename Construction, typename StateAccumulator, typename Params>
class nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >

This will do the usual Merkle-Damgård-style strengthening, padding with a 1 bit, then 0 bits as needed, then, if requested, the length.

Template Parameters
Hash
StateAccumulator
Params

Member Typedef Documentation

◆ accumulator_type

template<typename Construction , typename StateAccumulator , typename Params >
typedef StateAccumulator nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::accumulator_type
protected

◆ block_type

template<typename Construction , typename StateAccumulator , typename Params >
typedef construction_type::block_type nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::block_type
protected

◆ cache_type

template<typename Construction , typename StateAccumulator , typename Params >
typedef std::array<value_type, block_values> nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::cache_type

◆ construction_type

template<typename Construction , typename StateAccumulator , typename Params >
typedef Construction::type nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::construction_type
protected

◆ endian_type

template<typename Construction , typename StateAccumulator , typename Params >
typedef params_type::digest_endian nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::endian_type

◆ params_type

template<typename Construction , typename StateAccumulator , typename Params >
typedef Params nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::params_type
protected

◆ value_type

template<typename Construction , typename StateAccumulator , typename Params >
typedef boost::uint_t<value_bits>::least nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::value_type

Constructor & Destructor Documentation

◆ block_stream_processor()

template<typename Construction , typename StateAccumulator , typename Params >
nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::block_stream_processor ( accumulator_type acc)
inline

◆ ~block_stream_processor()

template<typename Construction , typename StateAccumulator , typename Params >
virtual nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::~block_stream_processor ( )
inlinevirtual

Member Function Documentation

◆ BOOST_STATIC_ASSERT() [1/2]

template<typename Construction , typename StateAccumulator , typename Params >
nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::BOOST_STATIC_ASSERT ( block_bits value_bits = =0)
protected

◆ BOOST_STATIC_ASSERT() [2/2]

template<typename Construction , typename StateAccumulator , typename Params >
nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::BOOST_STATIC_ASSERT ( word_bits value_bits = =0)

◆ operator()() [1/4]

template<typename Construction , typename StateAccumulator , typename Params >
template<typename ContainerT >
void nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::operator() ( const ContainerT &  c)
inline

◆ operator()() [2/4]

template<typename Construction , typename StateAccumulator , typename Params >
template<typename InputIterator >
void nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::operator() ( InputIterator  b,
InputIterator  e 
)
inline

◆ operator()() [3/4]

template<typename Construction , typename StateAccumulator , typename Params >
template<typename InputIterator , typename Category >
void nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::operator() ( InputIterator  b,
InputIterator  e,
Category   
)
inline

◆ operator()() [4/4]

template<typename Construction , typename StateAccumulator , typename Params >
template<typename InputIterator >
void nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::operator() ( InputIterator  b,
InputIterator  e,
std::random_access_iterator_tag   
)
inline

◆ process_block()

template<typename Construction , typename StateAccumulator , typename Params >
void nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::process_block ( std::size_t  block_seen = block_bits)
inlineprotected

◆ update_n() [1/2]

template<typename Construction , typename StateAccumulator , typename Params >
template<typename InputIterator >
void nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::update_n ( InputIterator  first,
InputIterator  last 
)
inline

◆ update_n() [2/2]

template<typename Construction , typename StateAccumulator , typename Params >
template<typename InputIterator >
void nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::update_n ( InputIterator  p,
size_t  n 
)
inline

◆ update_one()

template<typename Construction , typename StateAccumulator , typename Params >
void nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::update_one ( value_type  value)
inline

Member Data Documentation

◆ block_bits

template<typename Construction , typename StateAccumulator , typename Params >
constexpr static const std::size_t nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::block_bits = construction_type::block_bits
staticconstexprprotected

◆ block_values

template<typename Construction , typename StateAccumulator , typename Params >
constexpr static const std::size_t nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::block_values = block_bits / value_bits
staticconstexpr

◆ value_bits

template<typename Construction , typename StateAccumulator , typename Params >
constexpr static const std::size_t nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::value_bits = params_type::value_bits
staticconstexpr

◆ word_bits

template<typename Construction , typename StateAccumulator , typename Params >
constexpr static const std::size_t nil::crypto3::hashes::block_stream_processor< Construction, StateAccumulator, Params >::word_bits = construction_type::word_bits
staticconstexprprotected

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