diff options
Diffstat (limited to 'src/core/hle/service/nfp/amiibo_crypto.h')
-rw-r--r-- | src/core/hle/service/nfp/amiibo_crypto.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/hle/service/nfp/amiibo_crypto.h b/src/core/hle/service/nfp/amiibo_crypto.h index af7335912..1fa61174e 100644 --- a/src/core/hle/service/nfp/amiibo_crypto.h +++ b/src/core/hle/service/nfp/amiibo_crypto.h @@ -5,7 +5,7 @@ #include <array> -#include "core/hle/service/nfp/amiibo_types.h" +#include "core/hle/service/nfp/nfp_types.h" struct mbedtls_md_context_t; @@ -22,10 +22,12 @@ using HmacKey = std::array<u8, 0x10>; using DrgbOutput = std::array<u8, 0x20>; struct HashSeed { - u16 magic; + u16_be magic; std::array<u8, 0xE> padding; - std::array<u8, 0x8> uuid1; - std::array<u8, 0x8> uuid2; + UniqueSerialNumber uid_1; + u8 nintendo_id_1; + UniqueSerialNumber uid_2; + u8 nintendo_id_2; std::array<u8, 0x20> keygen_salt; }; static_assert(sizeof(HashSeed) == 0x40, "HashSeed is an invalid size"); @@ -89,6 +91,9 @@ void Cipher(const DerivedKeys& keys, const NTAG215File& in_data, NTAG215File& ou /// Loads both amiibo keys from key_retail.bin bool LoadKeys(InternalKey& locked_secret, InternalKey& unfixed_info); +/// Returns true if key_retail.bin exist +bool IsKeyAvailable(); + /// Decodes encripted amiibo data returns true if output is valid bool DecodeAmiibo(const EncryptedNTAG215File& encrypted_tag_data, NTAG215File& tag_data); |