2024-10-24 21:33:05 +01:00
|
|
|
#ifndef _BLUELIB_RANDOM_H_
|
|
|
|
|
#define _BLUELIB_RANDOM_H_
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2024-11-14 16:56:12 +00:00
|
|
|
#include <blue/core/misc.h>
|
2024-10-24 21:33:05 +01:00
|
|
|
|
|
|
|
|
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 *);
|
|
|
|
|
};
|
|
|
|
|
|
2024-11-14 16:56:12 +00:00
|
|
|
BLUE_API uint64_t z__b_platform_random_seed(void);
|
|
|
|
|
BLUE_API uint64_t z__b_platform_random_seed_secure(void);
|
2024-10-24 21:33:05 +01:00
|
|
|
|
|
|
|
|
#endif
|