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

RandState implementation. More...

#include "internal.h"
#include "crypto/chacha/chacha.h"
#include <string.h>

Go to the source code of this file.

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 implementation.

Definition in file randstate.c.