MCKL
Monte Carlo Kernel Library
Classes | Public Types | Static Public Member Functions | List of all members
mckl::Skein< Generator > Class Template Reference

Skein hash function. More...

#include <mckl/random/skein.hpp>

Classes

class  mono_hasher
 Configure type for stream hasher. More...
 
class  param_type
 Type of input paramters such as keys and messages. More...
 
class  tree_hasher
 
class  type_field
 Values of the type field. More...
 

Public Types

using key_type = typename Generator::key_type
 Type of the key. More...
 
using value_type = typename key_type::value_type
 Type of the key and tweak words. More...
 

Static Public Member Functions

static constexpr std::size_t bits ()
 The number of bits of internal state. More...
 
static constexpr std::size_t bytes ()
 The number of bytes of internal state. More...
 
static void hash (const param_type &M, std::size_t N, void *H)
 Simple hashing. More...
 
static void hash (std::size_t n, const param_type *M, std::size_t N, void *H, const param_type &K=param_type(), int Yl=0, int Yf=0, int Ym=0)
 Full Skein interface. More...
 

Detailed Description

template<typename Generator>
class mckl::Skein< Generator >

Skein hash function.

Definition at line 45 of file skein.hpp.

Member Typedef Documentation

◆ key_type

template<typename Generator >
using mckl::Skein< Generator >::key_type = typename Generator::key_type

Type of the key.

Definition at line 49 of file skein.hpp.

◆ value_type

template<typename Generator >
using mckl::Skein< Generator >::value_type = typename key_type::value_type

Type of the key and tweak words.

Definition at line 52 of file skein.hpp.

Member Function Documentation

◆ bits()

template<typename Generator >
static constexpr std::size_t mckl::Skein< Generator >::bits ( )
inlinestatic

The number of bits of internal state.

Definition at line 263 of file skein.hpp.

◆ bytes()

template<typename Generator >
static constexpr std::size_t mckl::Skein< Generator >::bytes ( )
inlinestatic

The number of bytes of internal state.

Definition at line 260 of file skein.hpp.

◆ hash() [1/2]

template<typename Generator >
static void mckl::Skein< Generator >::hash ( const param_type M,
std::size_t  N,
void *  H 
)
inlinestatic

Simple hashing.

Parameters
MThe messages
NThe lenght of the hash value in bits
HThe hash value

Definition at line 269 of file skein.hpp.

◆ hash() [2/2]

template<typename Generator >
static void mckl::Skein< Generator >::hash ( std::size_t  n,
const param_type M,
std::size_t  N,
void *  H,
const param_type K = param_type(),
int  Yl = 0,
int  Yf = 0,
int  Ym = 0 
)
inlinestatic

Full Skein interface.

Parameters
nThe number of messages
MThe messages
NThe lenght of the hash value in bits
HThe hash value
KThe optional key
YlTree leaf size
YfTree fan-out
YmTree maximum height

K.type() is ignored. No operation will be done if the types of messages are not valid. And runtime assertions will be rasied if assertion is not disabled.

Tree hashing is ignored for now

Definition at line 291 of file skein.hpp.