mf_classic_key_cache.h 805 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <nfc/protocols/mf_classic/mf_classic.h>
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. typedef struct MfClassicKeyCache MfClassicKeyCache;
  7. MfClassicKeyCache* mf_classic_key_cache_alloc(void);
  8. void mf_classic_key_cache_free(MfClassicKeyCache* instance);
  9. bool mf_classic_key_cache_load(MfClassicKeyCache* instance, const uint8_t* uid, size_t uid_len);
  10. void mf_classic_key_cache_load_from_data(MfClassicKeyCache* instance, const MfClassicData* data);
  11. bool mf_classic_key_cache_get_next_key(
  12. MfClassicKeyCache* instance,
  13. uint8_t* sector_num,
  14. MfClassicKey* key,
  15. MfClassicKeyType* key_type);
  16. bool mf_classic_key_cache_save(MfClassicKeyCache* instance, const MfClassicData* data);
  17. void mf_classic_key_cache_reset(MfClassicKeyCache* instance);
  18. #ifdef __cplusplus
  19. }
  20. #endif