From 945fe5aea919eb893c24ca59822ffd50d4d28b49 Mon Sep 17 00:00:00 2001 From: shadowninja108 Date: Sun, 28 Oct 2018 00:07:41 -0700 Subject: [PATCH] Split key file parser utility functions --- LibHac/Keyset.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/LibHac/Keyset.cs b/LibHac/Keyset.cs index 9f25203f..6eb6cf9c 100644 --- a/LibHac/Keyset.cs +++ b/LibHac/Keyset.cs @@ -290,12 +290,17 @@ namespace LibHac { var keyset = new Keyset(); + ReadKeyFile(keyset, filename, titleKeysFilename, consoleKeysFilename, logger); + + return keyset; + } + + public static void ReadKeyFile(Keyset keyset, string filename, string titleKeysFilename = null, string consoleKeysFilename = null, IProgressReport logger = null) + { if (filename != null) ReadMainKeys(keyset, filename, AllKeyDict, logger); if (consoleKeysFilename != null) ReadMainKeys(keyset, consoleKeysFilename, AllKeyDict, logger); if (titleKeysFilename != null) ReadTitleKeys(keyset, titleKeysFilename, logger); keyset.DeriveKeys(logger); - - return keyset; } public static void LoadConsoleKeys(this Keyset keyset, string filename, IProgressReport logger = null)