summaryrefslogtreecommitdiffstats
path: root/src/core/crypto/key_manager.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-16 23:10:01 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-23 17:53:30 +0200
commitcde665c56514c1b701c0fe94fc943c7692be7f32 (patch)
tree70ab7a531c27b88c423f08c3fd84313dad2fe081 /src/core/crypto/key_manager.cpp
parentgame_list: Add SD registration loading to game list (diff)
downloadyuzu-cde665c56514c1b701c0fe94fc943c7692be7f32.tar
yuzu-cde665c56514c1b701c0fe94fc943c7692be7f32.tar.gz
yuzu-cde665c56514c1b701c0fe94fc943c7692be7f32.tar.bz2
yuzu-cde665c56514c1b701c0fe94fc943c7692be7f32.tar.lz
yuzu-cde665c56514c1b701c0fe94fc943c7692be7f32.tar.xz
yuzu-cde665c56514c1b701c0fe94fc943c7692be7f32.tar.zst
yuzu-cde665c56514c1b701c0fe94fc943c7692be7f32.zip
Diffstat (limited to 'src/core/crypto/key_manager.cpp')
-rw-r--r--src/core/crypto/key_manager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp
index db8b22c85..95158e630 100644
--- a/src/core/crypto/key_manager.cpp
+++ b/src/core/crypto/key_manager.cpp
@@ -125,7 +125,8 @@ bool KeyManager::KeyFileExists(bool title) {
FileUtil::Exists(yuzu_keys_dir + DIR_SEP + "prod.keys");
}
-const std::unordered_map<std::string, KeyIndex<S128KeyType>> KeyManager::s128_file_id = {
+void KeyManager::DeriveSDSeedLazy() {
+const boost::container::flat_map<std::string, KeyIndex<S128KeyType>> KeyManager::s128_file_id = {
{"master_key_00", {S128KeyType::Master, 0, 0}},
{"master_key_01", {S128KeyType::Master, 1, 0}},
{"master_key_02", {S128KeyType::Master, 2, 0}},
@@ -169,7 +170,7 @@ const std::unordered_map<std::string, KeyIndex<S128KeyType>> KeyManager::s128_fi
{"key_area_key_system_04", {S128KeyType::KeyArea, 4, static_cast<u64>(KeyAreaKeyType::System)}},
};
-const std::unordered_map<std::string, KeyIndex<S256KeyType>> KeyManager::s256_file_id = {
+const boost::container::flat_map<std::string, KeyIndex<S256KeyType>> KeyManager::s256_file_id = {
{"header_key", {S256KeyType::Header, 0, 0}},
{"sd_card_save_key", {S256KeyType::SDSave, 0, 0}},
{"sd_card_nca_key", {S256KeyType::SDNCA, 0, 0}},