summaryrefslogtreecommitdiffstats
path: root/src/core/crypto
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-08-25 04:15:32 +0200
committerZach Hilman <zachhilman@gmail.com>2018-08-25 04:15:32 +0200
commit6314a799aa7e20789562d2e877949dfebb6194ce (patch)
treef5bd5cdd7e5804e7416abf75ab411c0be69b97e6 /src/core/crypto
parentxci: Ignore NCA files with updates in secure (diff)
downloadyuzu-6314a799aa7e20789562d2e877949dfebb6194ce.tar
yuzu-6314a799aa7e20789562d2e877949dfebb6194ce.tar.gz
yuzu-6314a799aa7e20789562d2e877949dfebb6194ce.tar.bz2
yuzu-6314a799aa7e20789562d2e877949dfebb6194ce.tar.lz
yuzu-6314a799aa7e20789562d2e877949dfebb6194ce.tar.xz
yuzu-6314a799aa7e20789562d2e877949dfebb6194ce.tar.zst
yuzu-6314a799aa7e20789562d2e877949dfebb6194ce.zip
Diffstat (limited to 'src/core/crypto')
-rw-r--r--src/core/crypto/key_manager.cpp5
-rw-r--r--src/core/crypto/key_manager.h1
-rw-r--r--src/core/crypto/xts_encryption_layer.cpp1
-rw-r--r--src/core/crypto/xts_encryption_layer.h1
4 files changed, 4 insertions, 4 deletions
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp
index 0b14bf15c..0b6c07de8 100644
--- a/src/core/crypto/key_manager.cpp
+++ b/src/core/crypto/key_manager.cpp
@@ -133,7 +133,7 @@ KeyManager::KeyManager() {
}
AttemptLoadKeyFile(yuzu_keys_dir, hactool_keys_dir, "title.keys", true);
- AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, "title.keys_autogenerated", false);
+ AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, "title.keys_autogenerated", true);
}
void KeyManager::LoadFromFile(const std::string& filename, bool is_title_keys) {
@@ -223,8 +223,7 @@ void KeyManager::WriteKeyToFile(bool title_key, std::string_view keyname,
<< "# If you are experiencing issues involving keys, it may help to delete this file\n";
}
- file << std::endl
- << fmt::format("{} = {}", keyname, Common::HexArrayToString(key)) << std::endl;
+ file << fmt::format("\n{} = {}", keyname, Common::HexArrayToString(key));
AttemptLoadKeyFile(yuzu_keys_dir, yuzu_keys_dir, filename, title_key);
}
diff --git a/src/core/crypto/key_manager.h b/src/core/crypto/key_manager.h
index 7a8728f76..7ca3e6cbc 100644
--- a/src/core/crypto/key_manager.h
+++ b/src/core/crypto/key_manager.h
@@ -6,6 +6,7 @@
#include <array>
#include <string>
+#include <string_view>
#include <type_traits>
#include <vector>
#include <boost/container/flat_map.hpp>
diff --git a/src/core/crypto/xts_encryption_layer.cpp b/src/core/crypto/xts_encryption_layer.cpp
index c6e5df1ce..c10832cfe 100644
--- a/src/core/crypto/xts_encryption_layer.cpp
+++ b/src/core/crypto/xts_encryption_layer.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <algorithm>
#include <cstring>
#include "common/assert.h"
#include "core/crypto/xts_encryption_layer.h"
diff --git a/src/core/crypto/xts_encryption_layer.h b/src/core/crypto/xts_encryption_layer.h
index 1e1acaf4a..7a1f1dc64 100644
--- a/src/core/crypto/xts_encryption_layer.h
+++ b/src/core/crypto/xts_encryption_layer.h
@@ -4,7 +4,6 @@
#pragma once
-#include <vector>
#include "core/crypto/aes_util.h"
#include "core/crypto/encryption_layer.h"
#include "core/crypto/key_manager.h"