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

Update FlipperNested

https://github.com/AloneLiberty/FlipperNested
This commit is contained in:
MX
2023-05-30 17:14:27 +03:00
parent 5db3d1ed7c
commit 4609d7ed93
12 changed files with 178 additions and 62 deletions

View File

@@ -5,28 +5,6 @@
#include "../../lib/crypto1/crypto1.h"
#define TAG "Nested"
void nfc_util_num2bytes(uint64_t src, uint8_t len, uint8_t* dest) {
furi_assert(dest);
furi_assert(len <= 8);
while(len--) {
dest[len] = (uint8_t)src;
src >>= 8;
}
}
uint64_t nfc_util_bytes2num(const uint8_t* src, uint8_t len) {
furi_assert(src);
furi_assert(len <= 8);
uint64_t res = 0;
while(len--) {
res = (res << 8) | (*src);
src++;
}
return res;
}
uint16_t nfca_get_crc16(uint8_t* buff, uint16_t len) {
uint16_t crc = 0x6363; // NFCA_CRC_INIT
uint8_t byte = 0;