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

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

#include <reverser.hpp>

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

Public Types

typedef bit_in_unit_byte_reverser< UnitBits, k+CHAR_BIT > next_type
 
typedef bit_in_unit_byte_reverser< UnitBits, k+CHAR_BIT > next_type
 
typedef bit_in_unit_byte_reverser< UnitBits, k+CHAR_BIT > next_type
 
typedef bit_in_unit_byte_reverser< UnitBits, k+CHAR_BIT > next_type
 
typedef bit_in_unit_byte_reverser< UnitBits, k+CHAR_BIT > 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 (!(UnitBits % CHAR_BIT))
 
 BOOST_STATIC_ASSERT (!(UnitBits % CHAR_BIT))
 
 BOOST_STATIC_ASSERT (!(UnitBits % CHAR_BIT))
 
 BOOST_STATIC_ASSERT (!(UnitBits % CHAR_BIT))
 
 BOOST_STATIC_ASSERT (!(UnitBits % CHAR_BIT))
 

Static Public Member Functions

static void reverse (UnitType &in, UnitType &out)
 
static void reverse (UnitType &in, UnitType &out)
 
static void reverse (UnitType &in, UnitType &out)
 
static void reverse (UnitType &in, UnitType &out)
 
static void reverse (UnitType &in, UnitType &out)
 

Detailed Description

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

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

Template Parameters
UnitBits
k

Member Typedef Documentation

◆ next_type [1/5]

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

◆ next_type [2/5]

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

◆ next_type [3/5]

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

◆ next_type [4/5]

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

◆ next_type [5/5]

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

◆ UnitType [1/5]

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

◆ UnitType [2/5]

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

◆ UnitType [3/5]

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

◆ UnitType [4/5]

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

◆ UnitType [5/5]

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

Member Function Documentation

◆ BOOST_STATIC_ASSERT() [1/5]

template<int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::BOOST_STATIC_ASSERT ( UnitBits % CHAR_BIT)

◆ BOOST_STATIC_ASSERT() [2/5]

template<int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::BOOST_STATIC_ASSERT ( UnitBits % CHAR_BIT)

◆ BOOST_STATIC_ASSERT() [3/5]

template<int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::BOOST_STATIC_ASSERT ( UnitBits % CHAR_BIT)

◆ BOOST_STATIC_ASSERT() [4/5]

template<int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::BOOST_STATIC_ASSERT ( UnitBits % CHAR_BIT)

◆ BOOST_STATIC_ASSERT() [5/5]

template<int UnitBits, int k = 0>
nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::BOOST_STATIC_ASSERT ( UnitBits % CHAR_BIT)

◆ reverse() [1/5]

template<int UnitBits, int k = 0>
static void nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::reverse ( UnitType in,
UnitType out 
)
inlinestatic

◆ reverse() [2/5]

template<int UnitBits, int k = 0>
static void nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::reverse ( UnitType in,
UnitType out 
)
inlinestatic

◆ reverse() [3/5]

template<int UnitBits, int k = 0>
static void nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::reverse ( UnitType in,
UnitType out 
)
inlinestatic

◆ reverse() [4/5]

template<int UnitBits, int k = 0>
static void nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::reverse ( UnitType in,
UnitType out 
)
inlinestatic

◆ reverse() [5/5]

template<int UnitBits, int k = 0>
static void nil::crypto3::detail::bit_in_unit_byte_reverser< UnitBits, k >::reverse ( UnitType in,
UnitType out 
)
inlinestatic

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