From 9c5248d101033cbb47739248ddff6e638aa97235 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 23 Apr 2021 09:58:38 -0400 Subject: aes_util: Make use of std::span Allows us to simplify the interface quite a bit as it will handle contiguous sequences for us. --- src/core/crypto/aes_util.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/core/crypto/aes_util.h') 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 +#include #include #include "common/common_types.h" #include "core/file_sys/vfs.h" @@ -33,10 +34,7 @@ public: AESCipher(Key key, Mode mode); ~AESCipher(); - template - void SetIV(const ContiguousContainer& container) { - SetIVImpl(std::data(container), std::size(container)); - } + void SetIV(std::span data); template 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 ctx; }; } // namespace Core::Crypto -- cgit v1.2.3