mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-22 07:35:47 +00:00
chore: small cleanups
This commit is contained in:
parent
a460eda195
commit
5b36a9cf9f
6 changed files with 8 additions and 8 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Gommon;
|
||||
using Ryujinx.Common.Logging;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
@ -34,6 +35,8 @@ namespace Ryujinx.UI.Common.Helper
|
|||
}
|
||||
}
|
||||
|
||||
public static void OpenFolder(FilePath path) => OpenFolder(path.Path);
|
||||
|
||||
public static void LocateFile(string path)
|
||||
{
|
||||
if (File.Exists(path))
|
||||
|
|
|
@ -334,7 +334,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public bool CanScanAmiiboBinaries => AmiiboBinReader.HasKeyRetailBinPath;
|
||||
public bool CanScanAmiiboBinaries => AmiiboBinReader.HasAmiiboKeyFile;
|
||||
|
||||
public bool ShowLoadProgress
|
||||
{
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
private void ScanBinAmiiboMenuItem_AttachedToVisualTree(object sender, VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
if (sender is MenuItem)
|
||||
ViewModel.IsAmiiboBinRequested = ViewModel.IsAmiiboRequested && AmiiboBinReader.HasKeyRetailBinPath;
|
||||
ViewModel.IsAmiiboBinRequested = ViewModel.IsAmiiboRequested && AmiiboBinReader.HasAmiiboKeyFile;
|
||||
}
|
||||
|
||||
private async void InstallFileTypes_Click(object sender, RoutedEventArgs e)
|
||||
|
|
Loading…
Reference in a new issue