mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
Add 36bit HID format, extend calcWiegand() to include oem bits
This commit is contained in:
parent
919cfb5841
commit
8d479e3a68
4 changed files with 38 additions and 6 deletions
|
@ -751,6 +751,15 @@ void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length) {
|
|||
*(target) = GetParity(source + length / 2, ODD, length / 2);
|
||||
}
|
||||
|
||||
// add HID parity to binary array: ODD prefix for 1st half of ID, EVEN suffix for 2nd half
|
||||
void wiegand_add_parity_swapped(uint8_t *target, uint8_t *source, uint8_t length)
|
||||
{
|
||||
*(target++)= GetParity(source, ODD, length / 2);
|
||||
memcpy(target, source, length);
|
||||
target += length;
|
||||
*(target)= GetParity(source + length / 2, EVEN, length / 2);
|
||||
}
|
||||
|
||||
// xor two arrays together for len items. The dst array contains the new xored values.
|
||||
void xor(unsigned char *dst, unsigned char *src, size_t len) {
|
||||
for (; len > 0; len--, dst++, src++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue