Add random util

Add a user-friendly tool to generate random numbers.
This commit is contained in:
Romain Vimont
2023-01-27 19:26:19 +01:00
parent 059ec45f82
commit 74e3f8b253
3 changed files with 41 additions and 0 deletions

16
app/src/util/rand.h Normal file
View File

@@ -0,0 +1,16 @@
#ifndef SC_RAND_H
#define SC_RAND_H
#include "common.h"
#include <inttypes.h>
struct sc_rand {
unsigned short xsubi[3];
};
void sc_rand_init(struct sc_rand *rand);
uint32_t sc_rand_u32(struct sc_rand *rand);
uint64_t sc_rand_u64(struct sc_rand *rand);
#endif