diff options
| author | 2021-04-23 09:58:38 -0400 | |
|---|---|---|
| committer | 2021-04-23 09:58:41 -0400 | |
| commit | 9c5248d101033cbb47739248ddff6e638aa97235 (patch) | |
| tree | 01099cd7611cfb9ede286bae03e33a8cfe5913bd /src/core/crypto/aes_util.cpp | |
| parent | Merge pull request #6223 from lat9nq/ffmpeg-external-fixes (diff) | |
| download | yuzu-9c5248d101033cbb47739248ddff6e638aa97235.tar.gz yuzu-9c5248d101033cbb47739248ddff6e638aa97235.tar.xz yuzu-9c5248d101033cbb47739248ddff6e638aa97235.zip | |
aes_util: Make use of std::span
Allows us to simplify the interface quite a bit as it will handle
contiguous sequences for us.
Diffstat (limited to 'src/core/crypto/aes_util.cpp')
| -rw-r--r-- | src/core/crypto/aes_util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/crypto/aes_util.cpp b/src/core/crypto/aes_util.cpp index cb7506241..85a666de9 100644 --- a/src/core/crypto/aes_util.cpp +++ b/src/core/crypto/aes_util.cpp | |||
| @@ -119,9 +119,9 @@ void AESCipher<Key, KeySize>::XTSTranscode(const u8* src, std::size_t size, u8* | |||
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | template <typename Key, std::size_t KeySize> | 121 | template <typename Key, std::size_t KeySize> |
| 122 | void AESCipher<Key, KeySize>::SetIVImpl(const u8* data, std::size_t size) { | 122 | void AESCipher<Key, KeySize>::SetIV(std::span<const u8> data) { |
| 123 | ASSERT_MSG((mbedtls_cipher_set_iv(&ctx->encryption_context, data, size) || | 123 | ASSERT_MSG((mbedtls_cipher_set_iv(&ctx->encryption_context, data.data(), data.size()) || |
| 124 | mbedtls_cipher_set_iv(&ctx->decryption_context, data, size)) == 0, | 124 | mbedtls_cipher_set_iv(&ctx->decryption_context, data.data(), data.size())) == 0, |
| 125 | "Failed to set IV on mbedtls ciphers."); | 125 | "Failed to set IV on mbedtls ciphers."); |
| 126 | } | 126 | } |
| 127 | 127 | ||