mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
support function
This commit is contained in:
parent
34e00146c6
commit
dd32fceb54
2 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue