textual
[RRG-proxmark3.git] / client / src / prng.h
blob3762f9f72c4db782270af13573793ed438d7d6df
1 //-----------------------------------------------------------------------------
2 //-----------------------------------------------------------------------------
3 // Burtle Prng - Modified. 42iterations instead of 20.
4 // ref: http://burtleburtle.net/bob/rand/smallprng.html
5 //-----------------------------------------------------------------------------
7 #ifndef __PRNG_H
8 #define __PRNG_H
10 #include "common.h"
12 typedef struct prng_ctx {
13 uint32_t a;
14 uint32_t b;
15 uint32_t c;
16 uint32_t d;
17 } prng_ctx;
19 //uint32_t burtle_get( prng_ctx *x );
20 uint32_t burtle_get_mod(prng_ctx *x);
21 void burtle_init_mod(prng_ctx *x, uint32_t seed);
22 void burtle_init(prng_ctx *x, uint32_t seed);
24 uint32_t GetSimplePrng(uint32_t seed);
26 #endif /* __PRNG_H */