unleashed-firmware/applications/main/nfc/helpers/mf_ultralight_auth.h
あく acc39a4bc0
Api Symbols: replace asserts with checks (#3507)
* Api Symbols: replace asserts with checks
* Api Symbols: replace asserts with checks part 2
* Update no args function signatures with void, to help compiler to track incorrect usage
* More unavoidable void
* Update PVS config and code to make it happy
* Format sources
* nfc: fix checks
* dead code cleanup & include fixes

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2024-03-19 23:43:52 +09:00

35 lines
853 B
C

#pragma once
#include <lib/nfc/protocols/mf_ultralight/mf_ultralight.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
MfUltralightAuthTypeNone,
MfUltralightAuthTypeReader,
MfUltralightAuthTypeManual,
MfUltralightAuthTypeXiaomi,
MfUltralightAuthTypeAmiibo,
} MfUltralightAuthType;
typedef struct {
MfUltralightAuthType type;
MfUltralightAuthPassword password;
MfUltralightAuthPack pack;
} MfUltralightAuth;
MfUltralightAuth* mf_ultralight_auth_alloc(void);
void mf_ultralight_auth_free(MfUltralightAuth* instance);
void mf_ultralight_auth_reset(MfUltralightAuth* instance);
bool mf_ultralight_generate_amiibo_pass(MfUltralightAuth* instance, uint8_t* uid, uint16_t uid_len);
bool mf_ultralight_generate_xiaomi_pass(MfUltralightAuth* instance, uint8_t* uid, uint16_t uid_len);
#ifdef __cplusplus
}
#endif