mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
CHG: some textual change to README.txt
ADD: a prng.c to collect some different PRNG's i've ran into ADD: some changes the tea implementation ADD: a enhanced version - SwapEndian64ex
This commit is contained in:
parent
a7474bb30a
commit
f4d0ffd1b9
8 changed files with 86 additions and 37 deletions
24
common/prng.h
Normal file
24
common/prng.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
// Burtle Prng - Modified. 42iterations instead of 20.
|
||||
// ref: http://burtleburtle.net/bob/rand/smallprng.html
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef __PRNG_H
|
||||
#define __PRNG_H
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
typedef struct prng_ctx {
|
||||
uint32_t a;
|
||||
uint32_t b;
|
||||
uint32_t c;
|
||||
uint32_t d;
|
||||
} prng_ctx;
|
||||
|
||||
//uint32_t burtle_get( prng_ctx *x );
|
||||
uint32_t burtle_get_mod( prng_ctx *x );
|
||||
void burtle_init_mod(prng_ctx *x, uint32_t seed );
|
||||
void burtle_init(prng_ctx *x, uint32_t seed );
|
||||
|
||||
uint32_t GetSimplePrng( uint32_t seed );
|
||||
#endif /* __PRNG_H */
|
Loading…
Add table
Add a link
Reference in a new issue