summaryrefslogtreecommitdiff
path: root/src/core/crypto
diff options
context:
space:
mode:
authorGravatar Ameer2020-07-04 00:59:40 -0400
committerGravatar Ameer2020-07-04 00:59:40 -0400
commitf829932ed191ad469df01342191bf2725e8a20bb (patch)
tree0ae185ce3ef43ef9b085aae7b9ad5abb04e3d239 /src/core/crypto
parentFix for always firing triggers on some controllers, trigger threshold more un... (diff)
parentMerge pull request #4218 from ogniK5377/opus-external (diff)
downloadyuzu-f829932ed191ad469df01342191bf2725e8a20bb.tar.gz
yuzu-f829932ed191ad469df01342191bf2725e8a20bb.tar.xz
yuzu-f829932ed191ad469df01342191bf2725e8a20bb.zip
Fix merge conflicts?
Diffstat (limited to 'src/core/crypto')
-rw-r--r--src/core/crypto/key_manager.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/crypto/key_manager.h b/src/core/crypto/key_manager.h
index 7265c4171..9269a73f2 100644
--- a/src/core/crypto/key_manager.h
+++ b/src/core/crypto/key_manager.h
@@ -223,7 +223,16 @@ bool operator<(const KeyIndex<KeyType>& lhs, const KeyIndex<KeyType>& rhs) {
223 223
224class KeyManager { 224class KeyManager {
225public: 225public:
226 KeyManager(); 226 static KeyManager& Instance() {
227 static KeyManager instance;
228 return instance;
229 }
230
231 KeyManager(const KeyManager&) = delete;
232 KeyManager& operator=(const KeyManager&) = delete;
233
234 KeyManager(KeyManager&&) = delete;
235 KeyManager& operator=(KeyManager&&) = delete;
227 236
228 bool HasKey(S128KeyType id, u64 field1 = 0, u64 field2 = 0) const; 237 bool HasKey(S128KeyType id, u64 field1 = 0, u64 field2 = 0) const;
229 bool HasKey(S256KeyType id, u64 field1 = 0, u64 field2 = 0) const; 238 bool HasKey(S256KeyType id, u64 field1 = 0, u64 field2 = 0) const;
@@ -257,6 +266,8 @@ public:
257 bool AddTicketPersonalized(Ticket raw); 266 bool AddTicketPersonalized(Ticket raw);
258 267
259private: 268private:
269 KeyManager();
270
260 std::map<KeyIndex<S128KeyType>, Key128> s128_keys; 271 std::map<KeyIndex<S128KeyType>, Key128> s128_keys;
261 std::map<KeyIndex<S256KeyType>, Key256> s256_keys; 272 std::map<KeyIndex<S256KeyType>, Key256> s256_keys;
262 273