unleashed-firmware/applications/main/nfc/helpers/felica_auth.c
hedger ffa3996a5e
[FL-3867] Code formatting update (#3765)
* 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>
2024-07-15 13:38:49 +09:00

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;
}