mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 15:00:46 +00:00
ffa3996a5e
* clang-format: AllowShortEnumsOnASingleLine: false * clang-format: InsertNewlineAtEOF: true * clang-format: Standard: c++20 * clang-format: AlignConsecutiveBitFields * clang-format: AlignConsecutiveMacros * clang-format: RemoveParentheses: ReturnStatement * clang-format: RemoveSemicolon: true * Restored RemoveParentheses: Leave, retained general changes for it * formatting: fixed logging TAGs * Formatting update for dev Co-authored-by: あく <alleteam@gmail.com>
21 lines
668 B
C
21 lines
668 B
C
#include "felica_auth.h"
|
|
|
|
FelicaAuthenticationContext* felica_auth_alloc() {
|
|
FelicaAuthenticationContext* instance = malloc(sizeof(FelicaAuthenticationContext));
|
|
memset(instance->card_key.data, 0, FELICA_DATA_BLOCK_SIZE);
|
|
instance->skip_auth = true;
|
|
return instance;
|
|
}
|
|
|
|
void felica_auth_free(FelicaAuthenticationContext* instance) {
|
|
furi_assert(instance);
|
|
free(instance);
|
|
}
|
|
|
|
void felica_auth_reset(FelicaAuthenticationContext* instance) {
|
|
furi_assert(instance);
|
|
memset(instance->card_key.data, 0, FELICA_DATA_BLOCK_SIZE);
|
|
instance->skip_auth = true;
|
|
instance->auth_status.external = 0;
|
|
instance->auth_status.internal = 0;
|
|
}
|