core: add random number generator
This commit is contained in:
17
core/random.h
Normal file
17
core/random.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _BLUELIB_RANDOM_H_
|
||||
#define _BLUELIB_RANDOM_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct b_random_ctx;
|
||||
|
||||
struct b_random_algorithm {
|
||||
const char *gen_name;
|
||||
void(*gen_init)(struct b_random_ctx *, unsigned long long seed);
|
||||
uint64_t(*gen_getrand)(struct b_random_ctx *);
|
||||
};
|
||||
|
||||
extern uint64_t z__b_platform_random_seed();
|
||||
extern uint64_t z__b_platform_random_seed_secure();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user