X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/2c7928874b055d8c6a006b9a57919dca1a3d615f..4e12287d19650c3e446deb83e87aa40121d65c18:/client/util.h diff --git a/client/util.h b/client/util.h index 6f9a1177..5674adcf 100644 --- a/client/util.h +++ b/client/util.h @@ -17,6 +17,9 @@ #include #include "data.h" +#ifndef ROTR +# define ROTR(x,n) (((uintmax_t)(x) >> (n)) | ((uintmax_t)(x) << ((sizeof(x) * 8) - (n)))) +#endif #ifndef MIN # define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif @@ -68,3 +71,4 @@ void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length); void xor(unsigned char *dst, unsigned char *src, size_t len); int32_t le24toh(uint8_t data[3]); +void rol(uint8_t *data, const size_t len);