X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/da198be4b5ae28a3d1c711b31081aba5af33ed6d..d8b7a5f29453ba32c9486b97e5afc8fb5e3cba34:/armsrc/crypto1.c?ds=sidebyside diff --git a/armsrc/crypto1.c b/armsrc/crypto1.c index 98d38b2b..68cb9b4e 100644 --- a/armsrc/crypto1.c +++ b/armsrc/crypto1.c @@ -141,3 +141,13 @@ uint32_t prng_successor(uint32_t x, uint32_t n) return SWAPENDIAN(x); } + +uint32_t prng_successor_one(uint32_t x) +{ + SWAPENDIAN(x); + + x = x >> 1 | (x >> 16 ^ x >> 18 ^ x >> 19 ^ x >> 21) << 31; + + return SWAPENDIAN(x); +} +