mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix some const params
This commit is contained in:
parent
7549f53b63
commit
996429fa9e
2 changed files with 6 additions and 6 deletions
|
@ -1147,7 +1147,7 @@ void binstr_2_bytes(uint8_t *target, size_t *targetlen, const char *src) {
|
|||
}
|
||||
}
|
||||
|
||||
void hex_xor(uint8_t *d, uint8_t *x, int n) {
|
||||
void hex_xor(uint8_t *d, const uint8_t *x, int n) {
|
||||
while (n--) {
|
||||
d[n] ^= x[n];
|
||||
}
|
||||
|
@ -1163,7 +1163,7 @@ uint8_t GetParity(const uint8_t *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(uint8_t *target, uint8_t *source, uint8_t length) {
|
||||
void wiegand_add_parity(uint8_t *target, const uint8_t *source, uint8_t length) {
|
||||
*(target++) = GetParity(source, EVEN, length / 2);
|
||||
memcpy(target, source, length);
|
||||
target += length;
|
||||
|
@ -1171,7 +1171,7 @@ void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length) {
|
|||
}
|
||||
|
||||
// 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) {
|
||||
void wiegand_add_parity_swapped(uint8_t *target, const uint8_t *source, uint8_t length) {
|
||||
*(target++) = GetParity(source, ODD, length / 2);
|
||||
memcpy(target, source, length);
|
||||
target += length;
|
||||
|
|
|
@ -141,11 +141,11 @@ int binstr_2_binarray(uint8_t *target, char *source, int length);
|
|||
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, uint8_t *x, int n);
|
||||
void hex_xor(uint8_t *d, const uint8_t *x, int n);
|
||||
|
||||
uint8_t GetParity(const uint8_t *bits, uint8_t type, int length);
|
||||
void wiegand_add_parity(uint8_t *target, uint8_t *source, uint8_t length);
|
||||
void wiegand_add_parity_swapped(uint8_t *target, uint8_t *source, uint8_t length);
|
||||
void wiegand_add_parity(uint8_t *target, const uint8_t *source, uint8_t length);
|
||||
void wiegand_add_parity_swapped(uint8_t *target, const uint8_t *source, uint8_t length);
|
||||
|
||||
//void xor(unsigned char *dst, unsigned char *src, size_t len);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue