X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/93f57590455b1c57ff09119b1de407ccd1d7ed62..9d1eaa281feb6ca36d04dafffc9565d9d7d2875f:/tools/nonce2key/crypto1.c?ds=sidebyside diff --git a/tools/nonce2key/crypto1.c b/tools/nonce2key/crypto1.c index fbf88898..e2aab71b 100644 --- a/tools/nonce2key/crypto1.c +++ b/tools/nonce2key/crypto1.c @@ -74,8 +74,8 @@ uint32_t crypto1_word(struct Crypto1State *s, uint32_t in, int is_encrypted) { uint32_t i, ret = 0; - for (i = 0; i < 4; ++i, in <<= 8) - ret = ret << 8 | crypto1_byte(s, in >> 24, is_encrypted); + for (i = 0; i < 32; ++i) + ret |= crypto1_bit(s, BEBIT(in, i), is_encrypted) << (i ^ 24); return ret; }