Electroneum
test_cn_fast_hash< bytes > Class Template Reference

#include <cn_fast_hash.h>

Collaboration diagram for test_cn_fast_hash< bytes >:

Public Member Functions

bool init ()
 
bool test ()
 

Static Public Attributes

static const size_t loop_count = bytes < 256 ? 100000 : bytes < 4096 ? 10000 : 1000
 

Detailed Description

template<size_t bytes>
class test_cn_fast_hash< bytes >

Definition at line 38 of file cn_fast_hash.h.

Member Function Documentation

◆ init()

template<size_t bytes>
bool test_cn_fast_hash< bytes >::init ( )
inline

Definition at line 43 of file cn_fast_hash.h.

44  {
45  crypto::rand(bytes, m_data.data());
46  return true;
47  }
void rand(size_t N, uint8_t *bytes)
Definition: crypto.h:209
Here is the call graph for this function:

◆ test()

template<size_t bytes>
bool test_cn_fast_hash< bytes >::test ( )
inline

Definition at line 49 of file cn_fast_hash.h.

50  {
52  crypto::cn_fast_hash(&m_data, bytes, hash);
53  return true;
54  }
void cn_fast_hash(const void *data, size_t length, char *hash)
POD_CLASS hash
Definition: hash.h:50
Here is the call graph for this function:

Member Data Documentation

◆ loop_count

template<size_t bytes>
const size_t test_cn_fast_hash< bytes >::loop_count = bytes < 256 ? 100000 : bytes < 4096 ? 10000 : 1000
static

Definition at line 41 of file cn_fast_hash.h.


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