MCKL
Monte Carlo Kernel Library
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
mckl::AESGenerator< KeySeqType > Class Template Reference

RNG generator using AES round functions. More...

#include <mckl/random/aes.hpp>

Public Types

using ctr_type = Counter< std::uint32_t, 4 >
 
using key_type = typename KeySeqType::key_type
 

Public Member Functions

key_type key () const
 
void operator() (const void *plain, void *cipher) const
 
template<typename ResultType >
void operator() (ctr_type &ctr, ResultType *r) const
 
template<typename ResultType >
void operator() (ctr_type &ctr, std::size_t n, ResultType *r) const
 
void reset (const key_type &key)
 

Static Public Member Functions

static constexpr std::size_t size ()
 

Friends

bool operator!= (const AESGenerator< KeySeqType > &gen1, const AESGenerator< KeySeqType > &gen2)
 
template<typename CharT , typename Traits >
std::basic_ostream< CharT, Traits > & operator<< (std::basic_ostream< CharT, Traits > &os, const AESGenerator< KeySeqType > &gen)
 
bool operator== (const AESGenerator< KeySeqType > &gen1, const AESGenerator< KeySeqType > &gen2)
 
template<typename CharT , typename Traits >
std::basic_istream< CharT, Traits > & operator>> (std::basic_istream< CharT, Traits > &is, AESGenerator< KeySeqType > &gen)
 

Detailed Description

template<typename KeySeqType>
class mckl::AESGenerator< KeySeqType >

RNG generator using AES round functions.

Definition at line 136 of file aes.hpp.

Member Typedef Documentation

◆ ctr_type

template<typename KeySeqType>
using mckl::AESGenerator< KeySeqType >::ctr_type = Counter<std::uint32_t, 4>

Definition at line 142 of file aes.hpp.

◆ key_type

template<typename KeySeqType>
using mckl::AESGenerator< KeySeqType >::key_type = typename KeySeqType::key_type

Definition at line 143 of file aes.hpp.

Member Function Documentation

◆ key()

template<typename KeySeqType>
key_type mckl::AESGenerator< KeySeqType >::key ( ) const
inline

Definition at line 147 of file aes.hpp.

◆ operator()() [1/3]

template<typename KeySeqType>
void mckl::AESGenerator< KeySeqType >::operator() ( const void *  plain,
void *  cipher 
) const
inline

Definition at line 151 of file aes.hpp.

◆ operator()() [2/3]

template<typename KeySeqType>
template<typename ResultType >
void mckl::AESGenerator< KeySeqType >::operator() ( ctr_type ctr,
ResultType *  r 
) const
inline

Definition at line 157 of file aes.hpp.

◆ operator()() [3/3]

template<typename KeySeqType>
template<typename ResultType >
void mckl::AESGenerator< KeySeqType >::operator() ( ctr_type ctr,
std::size_t  n,
ResultType *  r 
) const
inline

Definition at line 163 of file aes.hpp.

◆ reset()

template<typename KeySeqType>
void mckl::AESGenerator< KeySeqType >::reset ( const key_type key)
inline

Definition at line 149 of file aes.hpp.

◆ size()

template<typename KeySeqType>
static constexpr std::size_t mckl::AESGenerator< KeySeqType >::size ( )
inlinestatic

Definition at line 145 of file aes.hpp.

Friends And Related Function Documentation

◆ operator!=

template<typename KeySeqType>
bool operator!= ( const AESGenerator< KeySeqType > &  gen1,
const AESGenerator< KeySeqType > &  gen2 
)
friend

Definition at line 174 of file aes.hpp.

◆ operator<<

template<typename KeySeqType>
template<typename CharT , typename Traits >
std::basic_ostream<CharT, Traits>& operator<< ( std::basic_ostream< CharT, Traits > &  os,
const AESGenerator< KeySeqType > &  gen 
)
friend

Definition at line 181 of file aes.hpp.

◆ operator==

template<typename KeySeqType>
bool operator== ( const AESGenerator< KeySeqType > &  gen1,
const AESGenerator< KeySeqType > &  gen2 
)
friend

Definition at line 168 of file aes.hpp.

◆ operator>>

template<typename KeySeqType>
template<typename CharT , typename Traits >
std::basic_istream<CharT, Traits>& operator>> ( std::basic_istream< CharT, Traits > &  is,
AESGenerator< KeySeqType > &  gen 
)
friend

Definition at line 195 of file aes.hpp.