/ vendor / amiitool / include / nfc3d / amiibo.h
amiibo.h
 1  /*
 2   * (c) 2020-2021 nitz — chris marc dailey https://cmd.wtf
 3   * (c) 2015-2017 Marcos Del Sol Vives
 4   * (c) 2016      javiMaD
 5   *
 6   * SPDX-License-Identifier: MIT
 7   */
 8  
 9  #ifndef HAVE_NFC3D_AMIIBO_H
10  #define HAVE_NFC3D_AMIIBO_H
11  
12  #include "keygen.h"
13  #include <stdbool.h>
14  #include <stdint.h>
15  
16  #define NFC3D_AMIIBO_SIZE 520
17  
18  #pragma pack(1)
19  typedef struct
20  {
21  	nfc3d_keygen_masterkeys data;
22  	nfc3d_keygen_masterkeys tag;
23  } nfc3d_amiibo_keys;
24  #pragma pack()
25  
26  bool nfc3d_amiibo_unpack(const nfc3d_amiibo_keys* amiiboKeys, const uint8_t* tag, uint8_t* plain);
27  void nfc3d_amiibo_pack(const nfc3d_amiibo_keys* amiiboKeys, const uint8_t* plain, uint8_t* tag);
28  bool nfc3d_amiibo_load_keys(nfc3d_amiibo_keys* amiiboKeys, const uint8_t* data);
29  void nfc3d_amiibo_copy_app_data(const uint8_t* src, uint8_t* dst);
30  
31  #endif