diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-08-19 03:14:57 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-23 17:53:30 +0200 |
commit | 42dc856ce136c75f587649863ec5bd936ba8b07a (patch) | |
tree | 5b270705a38cc4187a5634f753c9caa2f398dfb8 /src/core/crypto/key_manager.cpp | |
parent | key_manager: Add support for autogenerated keys (diff) | |
download | yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.tar yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.tar.gz yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.tar.bz2 yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.tar.lz yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.tar.xz yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.tar.zst yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.zip |
Diffstat (limited to 'src/core/crypto/key_manager.cpp')
-rw-r--r-- | src/core/crypto/key_manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index 994ac4eec..acf635a65 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp @@ -102,7 +102,7 @@ Loader::ResultStatus DeriveSDKeys(std::array<Key256, 2>& sd_keys, const KeyManag AESCipher<Key128> cipher(sd_kek, Mode::ECB); for (size_t i = 0; i < 2; ++i) { - for (size_t j = 0; j < 0x20; ++j) + for (size_t j = 0; j < sd_key_sources[i].size(); ++j) sd_key_sources[i][j] ^= sd_seed[j & 0xF]; cipher.Transcode(sd_key_sources[i].data(), sd_key_sources[i].size(), sd_keys[i].data(), Op::Decrypt); |