mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
support function
This commit is contained in:
@@ -1153,6 +1153,13 @@ void hex_xor(uint8_t *d, const uint8_t *x, int n) {
|
||||
}
|
||||
}
|
||||
|
||||
void hex_xor_token(uint8_t *d, const uint8_t *x, int dn, int xn) {
|
||||
while (dn--) {
|
||||
d[dn] ^= x[dn % xn];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// return parity bit required to match type
|
||||
uint8_t GetParity(const uint8_t *bits, uint8_t type, int length) {
|
||||
int x;
|
||||
|
||||
@@ -142,6 +142,7 @@ void bytes_2_binstr(char *target, const uint8_t *source, size_t sourcelen);
|
||||
void binstr_2_bytes(uint8_t *target, size_t *targetlen, const char *src);
|
||||
|
||||
void hex_xor(uint8_t *d, const uint8_t *x, int n);
|
||||
void hex_xor_token(uint8_t *d, const uint8_t *x, int dn, int xn);
|
||||
|
||||
uint8_t GetParity(const uint8_t *bits, uint8_t type, int length);
|
||||
void wiegand_add_parity(uint8_t *target, const uint8_t *source, uint8_t length);
|
||||
|
||||
Reference in New Issue
Block a user