Noise-C
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Data Fields
NoiseHashState_s Struct Reference

Internal structure of the NoiseHashState type. More...

#include <internal.h>

Data Fields

uint16_t block_len
 Length of the underlying block for this hash algorithm. More...
 
void(* destroy )(NoiseHashState *state)
 Destroys this HashState prior to the memory being freed. More...
 
void(* finalize )(NoiseHashState *state, uint8_t *hash)
 Finalizes the HashState and returns the hash value. More...
 
int hash_id
 Algorithm identifier for the hash. More...
 
uint16_t hash_len
 Length of the output from this hash algorithm. More...
 
void(* reset )(NoiseHashState *state)
 Resets the HashState for a new hashing session. More...
 
size_t size
 Total size of the structure including subclass state. More...
 
void(* update )(NoiseHashState *state, const uint8_t *data, size_t len)
 Updates the HashState with more input data. More...
 

Detailed Description

Internal structure of the NoiseHashState type.

Definition at line 151 of file internal.h.

Field Documentation

uint16_t NoiseHashState_s::block_len

Length of the underlying block for this hash algorithm.

Definition at line 163 of file internal.h.

void(* NoiseHashState_s::destroy)(NoiseHashState *state)

Destroys this HashState prior to the memory being freed.

Parameters
statePoints to the HashState.

This function is called just before the memory for the HashState is deallocated. It gives the back end an opportunity to clean up linked objects.

This pointer can be NULL if the back end does not need any special clean up logic.

Definition at line 202 of file internal.h.

void(* NoiseHashState_s::finalize)(NoiseHashState *state, uint8_t *hash)

Finalizes the HashState and returns the hash value.

Parameters
statePoints to the HashState.
hashPoints to the buffer to receive the final hash value. This must be at least hash_len bytes in length.

Definition at line 188 of file internal.h.

int NoiseHashState_s::hash_id

Algorithm identifier for the hash.

Definition at line 157 of file internal.h.

uint16_t NoiseHashState_s::hash_len

Length of the output from this hash algorithm.

Definition at line 160 of file internal.h.

void(* NoiseHashState_s::reset)(NoiseHashState *state)

Resets the HashState for a new hashing session.

Parameters
statePoints to the HashState.

Definition at line 170 of file internal.h.

size_t NoiseHashState_s::size

Total size of the structure including subclass state.

Definition at line 154 of file internal.h.

void(* NoiseHashState_s::update)(NoiseHashState *state, const uint8_t *data, size_t len)

Updates the HashState with more input data.

Parameters
statePoints to the HashState.
dataPoints to the input data.
lenThe length of the input data in bytes.

Definition at line 179 of file internal.h.


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