libhcs
hcs_random.h
Go to the documentation of this file.
1 
14 #ifndef HCS_RAND_H
15 #define HCS_RAND_H
16 
17 #include <gmp.h>
18 
23 //#define HCS_STATIC_SEED
24 #undef HCS_STATIC_SEED
25 
29 #define HCS_RAND_SEED_BITS 256
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
39 typedef struct {
40  gmp_randstate_t rstate;
41 } hcs_random;
42 
50 
62 
68 void hcs_free_random(hcs_random *hr);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif
gmp_randstate_t rstate
gmp_randstate_t that is used internally
Definition: hcs_random.h:40
int hcs_reseed_random(hcs_random *hr)
Reseed the given hcs_random.
void hcs_free_random(hcs_random *hr)
Frees a hcs_random and all associated memory.
hcs_random * hcs_init_random(void)
Initialise an hcs_random and return a pointer to the newly created structure.
Random state used by a number of cryptographic functions.
Definition: hcs_random.h:39