nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k > Struct Template Reference

bit_in_unit_reverser transforms the sequence of bits in each unit of the input value into reversed sequence of bytes in each unit of the output value. The function reverse is recursively invoked and the parameter k is used to track the number of already processed input units. The recursion ends, when all input units have been processed, i.e. when k == InputBits. More...

#include <reverser.hpp>

+ Collaboration diagram for nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >:

Public Types

typedef bit_in_unit_reverser< InputBits, UnitBits, k+UnitBits > next_type
 
typedef bit_in_unit_reverser< InputBits, UnitBits, k+UnitBits > next_type
 
typedef bit_in_unit_reverser< InputBits, UnitBits, k+UnitBits > next_type
 
typedef bit_in_unit_reverser< InputBits, UnitBits, k+UnitBits > next_type
 
typedef bit_in_unit_reverser< InputBits, UnitBits, k+UnitBits > next_type
 
typedef boost::uint_t< UnitBits >::exact UnitType
 
typedef boost::uint_t< UnitBits >::exact UnitType
 
typedef boost::uint_t< UnitBits >::exact UnitType
 
typedef boost::uint_t< UnitBits >::exact UnitType
 
typedef boost::uint_t< UnitBits >::exact UnitType
 

Public Member Functions

 BOOST_STATIC_ASSERT (!(InputBits % UnitBits) &&!(UnitBits % CHAR_BIT))
 
 BOOST_STATIC_ASSERT (!(InputBits % UnitBits) &&!(UnitBits % CHAR_BIT))
 
 BOOST_STATIC_ASSERT (!(InputBits % UnitBits) &&!(UnitBits % CHAR_BIT))
 
 BOOST_STATIC_ASSERT (!(InputBits % UnitBits) &&!(UnitBits % CHAR_BIT))
 
 BOOST_STATIC_ASSERT (!(InputBits % UnitBits) &&!(UnitBits % CHAR_BIT))
 

Static Public Member Functions

template<typename ValueType >
static void reverse (ValueType &in, ValueType &out)
 
template<typename ValueType >
static void reverse (ValueType &in, ValueType &out)
 
template<typename ValueType >
static void reverse (ValueType &in, ValueType &out)
 
template<typename ValueType >
static void reverse (ValueType &in, ValueType &out)
 
template<typename ValueType >
static void reverse (ValueType &in, ValueType &out)
 

Detailed Description

template<int InputBits, int UnitBits, int k = 0>
struct nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >

bit_in_unit_reverser transforms the sequence of bits in each unit of the input value into reversed sequence of bytes in each unit of the output value. The function reverse is recursively invoked and the parameter k is used to track the number of already processed input units. The recursion ends, when all input units have been processed, i.e. when k == InputBits.

Template Parameters
InputBits
UnitBits
k

Member Typedef Documentation

◆ next_type [1/5]

template<int InputBits, int UnitBits, int k = 0>
typedef bit_in_unit_reverser<InputBits, UnitBits, k + UnitBits> nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::next_type

◆ next_type [2/5]

template<int InputBits, int UnitBits, int k = 0>
typedef bit_in_unit_reverser<InputBits, UnitBits, k + UnitBits> nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::next_type

◆ next_type [3/5]

template<int InputBits, int UnitBits, int k = 0>
typedef bit_in_unit_reverser<InputBits, UnitBits, k + UnitBits> nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::next_type

◆ next_type [4/5]

template<int InputBits, int UnitBits, int k = 0>
typedef bit_in_unit_reverser<InputBits, UnitBits, k + UnitBits> nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::next_type

◆ next_type [5/5]

template<int InputBits, int UnitBits, int k = 0>
typedef bit_in_unit_reverser<InputBits, UnitBits, k + UnitBits> nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::next_type

◆ UnitType [1/5]

template<int InputBits, int UnitBits, int k = 0>
typedef boost::uint_t<UnitBits>::exact nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::UnitType

◆ UnitType [2/5]

template<int InputBits, int UnitBits, int k = 0>
typedef boost::uint_t<UnitBits>::exact nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::UnitType

◆ UnitType [3/5]

template<int InputBits, int UnitBits, int k = 0>
typedef boost::uint_t<UnitBits>::exact nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::UnitType

◆ UnitType [4/5]

template<int InputBits, int UnitBits, int k = 0>
typedef boost::uint_t<UnitBits>::exact nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::UnitType

◆ UnitType [5/5]

template<int InputBits, int UnitBits, int k = 0>
typedef boost::uint_t<UnitBits>::exact nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::UnitType

Member Function Documentation

◆ BOOST_STATIC_ASSERT() [1/5]

template<int InputBits, int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::BOOST_STATIC_ASSERT ( InputBits % UnitBits) &&!(UnitBits % CHAR_BIT)

◆ BOOST_STATIC_ASSERT() [2/5]

template<int InputBits, int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::BOOST_STATIC_ASSERT ( InputBits % UnitBits) &&!(UnitBits % CHAR_BIT)

◆ BOOST_STATIC_ASSERT() [3/5]

template<int InputBits, int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::BOOST_STATIC_ASSERT ( InputBits % UnitBits) &&!(UnitBits % CHAR_BIT)

◆ BOOST_STATIC_ASSERT() [4/5]

template<int InputBits, int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::BOOST_STATIC_ASSERT ( InputBits % UnitBits) &&!(UnitBits % CHAR_BIT)

◆ BOOST_STATIC_ASSERT() [5/5]

template<int InputBits, int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::BOOST_STATIC_ASSERT ( InputBits % UnitBits) &&!(UnitBits % CHAR_BIT)

◆ reverse() [1/5]

template<int InputBits, int UnitBits, int k = 0>
template<typename ValueType >
static void nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::reverse ( ValueType in,
ValueType out 
)
inlinestatic

◆ reverse() [2/5]

template<int InputBits, int UnitBits, int k = 0>
template<typename ValueType >
static void nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::reverse ( ValueType in,
ValueType out 
)
inlinestatic

◆ reverse() [3/5]

template<int InputBits, int UnitBits, int k = 0>
template<typename ValueType >
static void nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::reverse ( ValueType in,
ValueType out 
)
inlinestatic

◆ reverse() [4/5]

template<int InputBits, int UnitBits, int k = 0>
template<typename ValueType >
static void nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::reverse ( ValueType in,
ValueType out 
)
inlinestatic

◆ reverse() [5/5]

template<int InputBits, int UnitBits, int k = 0>
template<typename ValueType >
static void nil::crypto3::detail::bit_in_unit_reverser< InputBits, UnitBits, k >::reverse ( ValueType in,
ValueType out 
)
inlinestatic

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