Go to the documentation of this file.
12 #ifndef __DECAF_SPONGERNG_H__
13 #define __DECAF_SPONGERNG_H__
32 const uint8_t *__restrict__ in,
48 ) DECAF_NONNULL DECAF_WARN_UNUSED;
63 uint8_t * __restrict__ out,
70 const uint8_t * __restrict__ in,
75 static DECAF_INLINE
void
76 decaf_spongerng_destroy (
Keccak CSPRNG structure as struct.
Definition: spongerng.h:22
void DECAF_API_VIS decaf_sha3_destroy(decaf_keccak_sponge_t sponge)
Destroy a DECAF_SHA3 or DECAF_SHAKE sponge context by overwriting it with 0.
struct decaf_keccak_sponge_s decaf_keccak_sponge_t[1]
Convenience GMP-style one-element array version.
Definition: shake.h:33
void DECAF_API_VIS decaf_spongerng_init_from_buffer(decaf_keccak_prng_t prng, const uint8_t *__restrict__ in, size_t len, int deterministic) DECAF_NONNULL
Initialize a sponge-based CSPRNG from a buffer.
decaf_keccak_sponge_t sponge
Internal sponge object.
Definition: spongerng.h:23
void DECAF_API_VIS decaf_spongerng_next(decaf_keccak_prng_t prng, uint8_t *__restrict__ out, size_t len)
Output bytes from a sponge-based CSPRNG.
void DECAF_API_VIS decaf_spongerng_stir(decaf_keccak_prng_t prng, const uint8_t *__restrict__ in, size_t len) DECAF_NONNULL
Stir entropy data into a sponge-based CSPRNG from a buffer.
decaf_error_t
Another boolean type used to indicate success or failure.
Definition: common.h:120
decaf_error_t DECAF_API_VIS decaf_spongerng_init_from_file(decaf_keccak_prng_t prng, const char *file, size_t len, int deterministic) DECAF_NONNULL DECAF_WARN_UNUSED
Initialize a sponge-based CSPRNG from a file.
decaf_error_t DECAF_API_VIS decaf_spongerng_init_from_dev_urandom(decaf_keccak_prng_t prng) DECAF_WARN_UNUSED
Initialize a nondeterministic sponge-based CSPRNG from /dev/urandom.
decaf_keccak_prng_s decaf_keccak_prng_t[1]
Keccak CSPRNG structure as one-element array.
Definition: spongerng.h:27