mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-24 09:16:13 +08:00
27 lines
749 B
C
27 lines
749 B
C
//-----------------------------------------------------------------------------
|
|
//-----------------------------------------------------------------------------
|
|
// Burtle Prng - Modified. 42iterations instead of 20.
|
|
// ref: http://burtleburtle.net/bob/rand/smallprng.html
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#ifndef __PRNG_H
|
|
#define __PRNG_H
|
|
|
|
#include "common.h"
|
|
|
|
typedef struct {
|
|
uint32_t a;
|
|
uint32_t b;
|
|
uint32_t c;
|
|
uint32_t d;
|
|
} prng_ctx_t;
|
|
|
|
//uint32_t burtle_get( prng_ctx_t *x );
|
|
uint32_t burtle_get_mod(prng_ctx_t *x);
|
|
void burtle_init_mod(prng_ctx_t *x, uint32_t seed);
|
|
void burtle_init(prng_ctx_t *x, uint32_t seed);
|
|
|
|
uint32_t GetSimplePrng(uint32_t seed);
|
|
|
|
#endif /* __PRNG_H */
|