chore: small cleanups
This commit is contained in:
@@ -333,7 +333,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
||||
return Path.Combine(AppDataManager.KeysDirPath, "key_retail.bin");
|
||||
}
|
||||
|
||||
public static bool HasKeyRetailBinPath => File.Exists(GetKeyRetailBinPath());
|
||||
public static bool HasAmiiboKeyFile => File.Exists(GetKeyRetailBinPath());
|
||||
|
||||
|
||||
public static DateTime DateTimeFromTag(ushort value)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
||||
|
||||
private byte[] DeriveKey(AmiiboMasterKey key, bool deriveAes, out byte[] derivedAesKey, out byte[] derivedAesIv)
|
||||
{
|
||||
List<byte> seed = new List<byte>();
|
||||
List<byte> seed = [];
|
||||
|
||||
// Start with the type string (14 bytes)
|
||||
seed.AddRange(key.TypeString);
|
||||
|
||||
@@ -33,10 +33,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
||||
byte[] dataBin = combinedBin.Take(80).ToArray();
|
||||
byte[] tagBin = combinedBin.Skip(80).Take(80).ToArray();
|
||||
|
||||
AmiiboMasterKey dataKey = new AmiiboMasterKey(dataBin);
|
||||
AmiiboMasterKey tagKey = new AmiiboMasterKey(tagBin);
|
||||
|
||||
return (dataKey, tagKey);
|
||||
return (new AmiiboMasterKey(dataBin), new AmiiboMasterKey(tagBin));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user