fix some const params

This commit is contained in:
iceman1001 committed 2024-09-06 10:13:02 +02:00
1 parent 7549f53b63
commit 996429fa9e
2 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -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;