Monero
Classes | Macros | Enumerations | Functions | Variables
hash-ops.h File Reference
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "int-util.h"
#include "warnings.h"
Include dependency graph for hash-ops.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  hash_state
 

Macros

#define RX_BLOCK_VERSION   12
 
#define RX_BLOCK_VERSION   12
 

Enumerations

enum  { HASH_SIZE = 32, HASH_DATA_AREA = 136 }
 

Functions

static void * padd (void *p, size_t i)
 
static const void * cpadd (const void *p, size_t i)
 
static void place_length (uint8_t *buffer, size_t bufsize, size_t length)
 
void hash_permutation (union hash_state *state)
 
void hash_process (union hash_state *state, const uint8_t *buf, size_t count)
 
void cn_fast_hash (const void *data, size_t length, char *hash)
 
void cn_slow_hash (const void *data, size_t length, char *hash, int variant, int prehashed, uint64_t height)
 
void hash_extra_blake (const void *data, size_t length, char *hash)
 
void hash_extra_groestl (const void *data, size_t length, char *hash)
 
void hash_extra_jh (const void *data, size_t length, char *hash)
 
void hash_extra_skein (const void *data, size_t length, char *hash)
 
void tree_hash (const char(*hashes)[HASH_SIZE], size_t count, char *root_hash)
 
bool tree_path (size_t count, size_t idx, uint32_t *path)
 
bool tree_branch (const char(*hashes)[HASH_SIZE], size_t count, const char *hash, char(*branch)[HASH_SIZE], size_t *depth, uint32_t *path)
 
bool tree_branch_hash (const char hash[HASH_SIZE], const char(*branch)[HASH_SIZE], size_t depth, uint32_t path, char root[HASH_SIZE])
 
bool is_branch_in_tree (const char hash[HASH_SIZE], const char root[HASH_SIZE], const char(*branch)[HASH_SIZE], size_t depth, uint32_t path)
 
void rx_slow_hash_allocate_state (void)
 
void rx_slow_hash_free_state (void)
 
uint64_t rx_seedheight (const uint64_t height)
 
void rx_seedheights (const uint64_t height, uint64_t *seed_height, uint64_t *next_height)
 
void rx_set_main_seedhash (const char *seedhash, size_t max_dataset_init_threads)
 
void rx_slow_hash (const char *seedhash, const void *data, size_t length, char *result_hash)
 
void rx_set_miner_thread (uint32_t value, size_t max_dataset_init_threads)
 
uint32_t rx_get_miner_thread (void)
 

Variables

 PUSH_WARNINGS
 

Macro Definition Documentation

◆ RX_BLOCK_VERSION [1/2]

#define RX_BLOCK_VERSION   12

◆ RX_BLOCK_VERSION [2/2]

#define RX_BLOCK_VERSION   12

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HASH_SIZE 
HASH_DATA_AREA 

Function Documentation

◆ cn_fast_hash()

void cn_fast_hash ( const void *  data,
size_t  length,
char *  hash 
)

◆ cn_slow_hash()

void cn_slow_hash ( const void *  data,
size_t  length,
char *  hash,
int  variant,
int  prehashed,
uint64_t  height 
)

◆ cpadd()

static const void* cpadd ( const void *  p,
size_t  i 
)
inlinestatic

◆ hash_extra_blake()

void hash_extra_blake ( const void *  data,
size_t  length,
char *  hash 
)

◆ hash_extra_groestl()

void hash_extra_groestl ( const void *  data,
size_t  length,
char *  hash 
)

◆ hash_extra_jh()

void hash_extra_jh ( const void *  data,
size_t  length,
char *  hash 
)

◆ hash_extra_skein()

void hash_extra_skein ( const void *  data,
size_t  length,
char *  hash 
)

◆ hash_permutation()

void hash_permutation ( union hash_state state)

◆ hash_process()

void hash_process ( union hash_state state,
const uint8_t buf,
size_t  count 
)

◆ is_branch_in_tree()

bool is_branch_in_tree ( const char  hash[HASH_SIZE],
const char  root[HASH_SIZE],
const char(*)  branch[HASH_SIZE],
size_t  depth,
uint32_t  path 
)

◆ padd()

static void* padd ( void *  p,
size_t  i 
)
inlinestatic

◆ place_length()

static void place_length ( uint8_t buffer,
size_t  bufsize,
size_t  length 
)
inlinestatic

◆ rx_get_miner_thread()

uint32_t rx_get_miner_thread ( void  )

◆ rx_seedheight()

uint64_t rx_seedheight ( const uint64_t  height)

◆ rx_seedheights()

void rx_seedheights ( const uint64_t  height,
uint64_t seed_height,
uint64_t next_height 
)

◆ rx_set_main_seedhash()

void rx_set_main_seedhash ( const char *  seedhash,
size_t  max_dataset_init_threads 
)

◆ rx_set_miner_thread()

void rx_set_miner_thread ( uint32_t  value,
size_t  max_dataset_init_threads 
)

◆ rx_slow_hash()

void rx_slow_hash ( const char *  seedhash,
const void *  data,
size_t  length,
char *  result_hash 
)

◆ rx_slow_hash_allocate_state()

void rx_slow_hash_allocate_state ( void  )

◆ rx_slow_hash_free_state()

void rx_slow_hash_free_state ( void  )

◆ tree_branch()

bool tree_branch ( const char(*)  hashes[HASH_SIZE],
size_t  count,
const char *  hash,
char(*)  branch[HASH_SIZE],
size_t *  depth,
uint32_t path 
)

◆ tree_branch_hash()

bool tree_branch_hash ( const char  hash[HASH_SIZE],
const char(*)  branch[HASH_SIZE],
size_t  depth,
uint32_t  path,
char  root[HASH_SIZE] 
)

◆ tree_hash()

void tree_hash ( const char(*)  hashes[HASH_SIZE],
size_t  count,
char *  root_hash 
)

◆ tree_path()

bool tree_path ( size_t  count,
size_t  idx,
uint32_t path 
)

Variable Documentation

◆ PUSH_WARNINGS

PUSH_WARNINGS