diff options
| author | bunnei <bunneidev@gmail.com> | 2021-04-23 11:37:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-23 11:37:17 -0700 |
| commit | 51c787bfc1741b737a02266e9d0176945f0193f4 (patch) | |
| tree | 7fb1b4ceb464b32bd21b28a0ac2c7f57e28f2ae7 /src/core/crypto/aes_util.h | |
| parent | 19bbdedf00db2c611debada864821ce63f6532e4 (diff) | |
| parent | 9c5248d101033cbb47739248ddff6e638aa97235 (diff) | |
Merge pull request #6231 from lioncash/aes
aes_util: Make use of std::span
Diffstat (limited to 'src/core/crypto/aes_util.h')
| -rw-r--r-- | src/core/crypto/aes_util.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/crypto/aes_util.h b/src/core/crypto/aes_util.h index e2a304186..230451b8f 100644 --- a/src/core/crypto/aes_util.h +++ b/src/core/crypto/aes_util.h @@ -5,6 +5,7 @@ #pragma once #include <memory> +#include <span> #include <type_traits> #include "common/common_types.h" #include "core/file_sys/vfs.h" @@ -33,10 +34,7 @@ public: AESCipher(Key key, Mode mode); ~AESCipher(); - template <typename ContiguousContainer> - void SetIV(const ContiguousContainer& container) { - SetIVImpl(std::data(container), std::size(container)); - } + void SetIV(std::span<const u8> data); template <typename Source, typename Dest> void Transcode(const Source* src, std::size_t size, Dest* dest, Op op) const { @@ -60,8 +58,6 @@ public: std::size_t sector_size, Op op); private: - void SetIVImpl(const u8* data, std::size_t size); - std::unique_ptr<CipherContext> ctx; }; } // namespace Core::Crypto |
