[macOS] fix mbedtls
All checks were successful
eden-license / license-header (pull_request) Successful in 21s

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-08-25 07:48:37 +00:00
parent 35c8a9fb5c
commit 0fb70936d9
Signed by: Lizzie
GPG key ID: 00287378CADCAB13

View file

@ -65,7 +65,12 @@ NAX::NAX(VirtualFile file_, std::array<u8, 0x10> nca_id)
: header(std::make_unique<NAXHeader>()),
file(std::move(file_)), keys{Core::Crypto::KeyManager::Instance()} {
Core::Crypto::SHA256Hash hash{};
#ifdef MBEDTLS_DEPRECATED_REMOVED
mbedtls_sha256_ret(nca_id.data(), nca_id.size(), hash.data(), 0);
#else
// Compatibility with macOS Xcode-15
mbedtls_sha256(nca_id.data(), nca_id.size(), hash.data(), 0);
#endif
status = Parse(fmt::format("/registered/000000{:02X}/{}.nca", hash[0],
Common::HexToString(nca_id, false)));
}