1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 13:09:49 +04:00

Fix valid_nonce

This commit is contained in:
noproto
2024-08-11 14:30:26 -04:00
parent 3acba77070
commit 6332ec7478
6 changed files with 18 additions and 18 deletions

View File

@@ -13,6 +13,10 @@ static const uint8_t nfc_util_odd_byte_parity[256] = {
0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1,
1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1};
uint8_t nfc_util_even_parity8(uint8_t data) {
return !nfc_util_odd_byte_parity[data];
}
uint8_t nfc_util_even_parity32(uint32_t data) {
// data ^= data >> 16;
// data ^= data >> 8;