diff options
| author | 2018-08-18 21:14:57 -0400 | |
|---|---|---|
| committer | 2018-08-23 11:53:30 -0400 | |
| commit | 42dc856ce136c75f587649863ec5bd936ba8b07a (patch) | |
| tree | 5b270705a38cc4187a5634f753c9caa2f398dfb8 /src/core/crypto/key_manager.cpp | |
| parent | key_manager: Add support for autogenerated keys (diff) | |
| download | yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.tar.gz yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.tar.xz yuzu-42dc856ce136c75f587649863ec5bd936ba8b07a.zip | |
crypto: Eliminate magic constants
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 | |||
| 102 | 102 | ||
| 103 | AESCipher<Key128> cipher(sd_kek, Mode::ECB); | 103 | AESCipher<Key128> cipher(sd_kek, Mode::ECB); |
| 104 | for (size_t i = 0; i < 2; ++i) { | 104 | for (size_t i = 0; i < 2; ++i) { |
| 105 | for (size_t j = 0; j < 0x20; ++j) | 105 | for (size_t j = 0; j < sd_key_sources[i].size(); ++j) |
| 106 | sd_key_sources[i][j] ^= sd_seed[j & 0xF]; | 106 | sd_key_sources[i][j] ^= sd_seed[j & 0xF]; |
| 107 | cipher.Transcode(sd_key_sources[i].data(), sd_key_sources[i].size(), sd_keys[i].data(), | 107 | cipher.Transcode(sd_key_sources[i].data(), sd_key_sources[i].size(), sd_keys[i].data(), |
| 108 | Op::Decrypt); | 108 | Op::Decrypt); |