add generic get_random_bytes function

This commit is contained in:
Daniel Micay 2019-04-15 04:52:18 -04:00
parent f115be8392
commit c7e2cb82f4
2 changed files with 24 additions and 1 deletions

View file

@ -15,6 +15,7 @@ struct random_state {
};
void random_state_init(struct random_state *state);
void get_random_bytes(struct random_state *state, void *buf, size_t size);
u16 get_random_u16(struct random_state *state);
u16 get_random_u16_uniform(struct random_state *state, u16 bound);
u64 get_random_u64(struct random_state *state);