summaryrefslogtreecommitdiffstats
path: root/src/core/crypto/partition_data_manager.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-12 14:37:58 +0100
committerLioncash <mathew1800@gmail.com>2019-11-12 14:45:56 +0100
commite0c46e6879be4720a89429a3151b84103456e4b6 (patch)
treed287cceff5445e19b5c68ed4141b0bef5d61ef83 /src/core/crypto/partition_data_manager.cpp
parentMerge pull request #3085 from bunnei/web-token-b64 (diff)
downloadyuzu-e0c46e6879be4720a89429a3151b84103456e4b6.tar
yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.tar.gz
yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.tar.bz2
yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.tar.lz
yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.tar.xz
yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.tar.zst
yuzu-e0c46e6879be4720a89429a3151b84103456e4b6.zip
Diffstat (limited to '')
-rw-r--r--src/core/crypto/partition_data_manager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/crypto/partition_data_manager.cpp b/src/core/crypto/partition_data_manager.cpp
index 594cd82c5..a4b09fd12 100644
--- a/src/core/crypto/partition_data_manager.cpp
+++ b/src/core/crypto/partition_data_manager.cpp
@@ -161,7 +161,7 @@ std::array<u8, key_size> FindKeyFromHex(const std::vector<u8>& binary,
std::array<u8, 0x20> temp{};
for (size_t i = 0; i < binary.size() - key_size; ++i) {
- mbedtls_sha256(binary.data() + i, key_size, temp.data(), 0);
+ mbedtls_sha256_ret(binary.data() + i, key_size, temp.data(), 0);
if (temp != hash)
continue;
@@ -189,7 +189,7 @@ static std::array<Key128, 0x20> FindEncryptedMasterKeyFromHex(const std::vector<
AESCipher<Key128> cipher(key, Mode::ECB);
for (size_t i = 0; i < binary.size() - 0x10; ++i) {
cipher.Transcode(binary.data() + i, dec_temp.size(), dec_temp.data(), Op::Decrypt);
- mbedtls_sha256(dec_temp.data(), dec_temp.size(), temp.data(), 0);
+ mbedtls_sha256_ret(dec_temp.data(), dec_temp.size(), temp.data(), 0);
for (size_t k = 0; k < out.size(); ++k) {
if (temp == master_key_hashes[k]) {