Noise-C
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Typedefs | Functions
randstate.h File Reference

RandState interface. More...

#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct NoiseRandState_s NoiseRandState
 Opaque object that represents a random number generator. More...
 

Functions

int noise_randstate_free (NoiseRandState *state)
 Frees a RandState object after destroying all sensitive material. More...
 
int noise_randstate_generate (NoiseRandState *state, uint8_t *buffer, size_t len)
 Generates random bytes for use by the application. More...
 
int noise_randstate_generate_simple (uint8_t *buffer, size_t len)
 Generates random data without first creating a RandState object. More...
 
int noise_randstate_new (NoiseRandState **state)
 Creates a new random number generator. More...
 
int noise_randstate_pad (NoiseRandState *state, uint8_t *payload, size_t orig_len, size_t padded_len, int padding_mode)
 Adds padding bytes to the end of a message payload. More...
 
int noise_randstate_reseed (NoiseRandState *state)
 Reseeds the random number generator from operating system entropy. More...
 

Detailed Description

RandState interface.

Definition in file randstate.h.