Electroneum
Classes | 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
 

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)
 

Variables

 PUSH_WARNINGS
 

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 
)

◆ 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

◆ tree_hash()

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

Variable Documentation

◆ PUSH_WARNINGS

PUSH_WARNINGS