X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/3bc3598e880b68870cfcc55fbdda443d77395809..c579a5871e754224aa8d6d5b05ca7a0d583e8af9:/client/util.c diff --git a/client/util.c b/client/util.c index 0418dd98..b8d5c316 100644 --- a/client/util.c +++ b/client/util.c @@ -372,7 +372,7 @@ void binarraytobinstring(char *target, char *source, int length) } // return parity bit required to match type -uint8_t parity( char *bits, uint8_t type, int length) +uint8_t GetParity( char *bits, uint8_t type, int length) { int x; @@ -386,8 +386,8 @@ uint8_t parity( char *bits, uint8_t type, int length) // add HID parity to binary array: EVEN prefix for 1st half of ID, ODD suffix for 2nd half void wiegand_add_parity(char *target, char *source, char length) { - *(target++)= parity(source, EVEN, length / 2); + *(target++)= GetParity(source, EVEN, length / 2); memcpy(target, source, length); target += length; - *(target)= parity(source + length / 2, ODD, length / 2); + *(target)= GetParity(source + length / 2, ODD, length / 2); }