18 lines
372 B
C
18 lines
372 B
C
|
|
#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
|