#include <tomcrypt_prng.h>
int(* ltc_prng_descriptor::add_entropy)(const unsigned char *in, unsigned long inlen, prng_state *prng) |
Add entropy to the PRNG
- Parameters
-
in | The entropy |
inlen | Length of the entropy (octets)\ |
prng | The PRNG state |
- Returns
- CRYPT_OK if successful
int(* ltc_prng_descriptor::done)(prng_state *prng) |
Terminate a PRNG state
- Parameters
-
prng | The PRNG state to terminate |
- Returns
- CRYPT_OK if successful
int ltc_prng_descriptor::export_size |
size in bytes of exported state
char* ltc_prng_descriptor::name |
int(* ltc_prng_descriptor::pexport)(unsigned char *out, unsigned long *outlen, prng_state *prng) |
Export a PRNG state
- Parameters
-
out | [out] The destination for the state |
outlen | [in/out] The max size and resulting size of the PRNG state |
prng | The PRNG to export |
- Returns
- CRYPT_OK if successful
int(* ltc_prng_descriptor::pimport)(const unsigned char *in, unsigned long inlen, prng_state *prng) |
Import a PRNG state
- Parameters
-
in | The data to import |
inlen | The length of the data to import (octets) |
prng | The PRNG to initialize/import |
- Returns
- CRYPT_OK if successful
unsigned long(* ltc_prng_descriptor::read)(unsigned char *out, unsigned long outlen, prng_state *prng) |
Read from the PRNG
- Parameters
-
out | [out] Where to store the data |
outlen | Length of data desired (octets) |
prng | The PRNG state to read from |
- Returns
- Number of octets read
int(* ltc_prng_descriptor::ready)(prng_state *prng) |
Ready a PRNG state to read from
- Parameters
-
prng | The PRNG state to ready |
- Returns
- CRYPT_OK if successful
int(* ltc_prng_descriptor::start)(prng_state *prng) |
Start a PRNG state
- Parameters
-
prng | [out] The state to initialize |
- Returns
- CRYPT_OK if successful
int(* ltc_prng_descriptor::test)(void) |
Self-test the PRNG
- Returns
- CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled
The documentation for this struct was generated from the following file: