mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-23 21:34:35 +03:00
d31578508a
* digital signal: introduce digital signal * nfca: add nfca signal encoder * nfc: add mifare classic emulation scene * nfca: add classic emulation support to lib and hal * mifare classic: support basic read commands * nfc: add mifare classic menu scene * mifare classic: start parsing commands in emulation * mifare classic: add nested auth * nfc: fix errors * mifare classic: add encrypt function * nfc: fix mifare classic save * lib hex: add hex uint64_t ASCII parser * flipper format: add uint64 hex format support * nfc: add mifare classic key map * nfc: hide mifare classic keys on emulation * mifare classic: add NACK responce * nfc: add partial bytes support in transparent mode * nfc: mifare classic add shadow file support * digital signal: move arr buffer from BSS to heap * mifare classic: process access bits more careful * nfca: fix memory leack * nfc: format sources * mifare classic: cleun up Co-authored-by: あく <alleteam@gmail.com>
24 lines
515 B
C
24 lines
515 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
typedef struct {
|
|
uint32_t odd;
|
|
uint32_t even;
|
|
} Crypto1;
|
|
|
|
void crypto1_reset(Crypto1* crypto1);
|
|
|
|
void crypto1_init(Crypto1* crypto1, uint64_t key);
|
|
|
|
uint8_t crypto1_bit(Crypto1* crypto1, uint8_t in, int is_encrypted);
|
|
|
|
uint8_t crypto1_byte(Crypto1* crypto1, uint8_t in, int is_encrypted);
|
|
|
|
uint32_t crypto1_word(Crypto1* crypto1, uint32_t in, int is_encrypted);
|
|
|
|
uint32_t crypto1_filter(uint32_t in);
|
|
|
|
uint32_t prng_successor(uint32_t x, uint32_t n);
|