amiibo.h 746 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * (c) 2015-2017 Marcos Del Sol Vives
  3. * (c) 2016 javiMaD
  4. *
  5. * SPDX-License-Identifier: MIT
  6. */
  7. #ifndef HAVE_NFC3D_AMIIBO_H
  8. #define HAVE_NFC3D_AMIIBO_H
  9. #include <stdint.h>
  10. #include <stdbool.h>
  11. #include "keygen.h"
  12. #define NFC3D_AMIIBO_SIZE 520
  13. #pragma pack(1)
  14. typedef struct {
  15. nfc3d_keygen_masterkeys data;
  16. nfc3d_keygen_masterkeys tag;
  17. } nfc3d_amiibo_keys;
  18. #pragma pack()
  19. bool nfc3d_amiibo_unpack(const nfc3d_amiibo_keys * amiiboKeys, const uint8_t * tag, uint8_t * plain);
  20. void nfc3d_amiibo_pack(const nfc3d_amiibo_keys * amiiboKeys, const uint8_t * plain, uint8_t * tag);
  21. bool nfc3d_amiibo_load_keys(nfc3d_amiibo_keys * amiiboKeys, const char * path);
  22. void nfc3d_amiibo_copy_app_data(const uint8_t * src, uint8_t * dst);
  23. #endif