diff options
author | raven02 <jacky.kktsui@yahoo.com.hk> | 2018-09-19 13:53:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 13:53:11 +0200 |
commit | c8f9bbbf859c0e38cf691b64c67761382fcebfc2 (patch) | |
tree | 99529c2277a6b740a6e278985c5147fa649c5497 /src/core/crypto/aes_util.h | |
parent | Add 1D sampler for TLDS - TexelFetch (Mario Rabbids) (diff) | |
parent | Merge pull request #1348 from ogniK5377/GetImageSize (diff) | |
download | yuzu-c8f9bbbf859c0e38cf691b64c67761382fcebfc2.tar yuzu-c8f9bbbf859c0e38cf691b64c67761382fcebfc2.tar.gz yuzu-c8f9bbbf859c0e38cf691b64c67761382fcebfc2.tar.bz2 yuzu-c8f9bbbf859c0e38cf691b64c67761382fcebfc2.tar.lz yuzu-c8f9bbbf859c0e38cf691b64c67761382fcebfc2.tar.xz yuzu-c8f9bbbf859c0e38cf691b64c67761382fcebfc2.tar.zst yuzu-c8f9bbbf859c0e38cf691b64c67761382fcebfc2.zip |
Diffstat (limited to 'src/core/crypto/aes_util.h')
-rw-r--r-- | src/core/crypto/aes_util.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/crypto/aes_util.h b/src/core/crypto/aes_util.h index 8ce9d6612..edc4ab910 100644 --- a/src/core/crypto/aes_util.h +++ b/src/core/crypto/aes_util.h @@ -25,7 +25,7 @@ enum class Op { Decrypt, }; -template <typename Key, size_t KeySize = sizeof(Key)> +template <typename Key, std::size_t KeySize = sizeof(Key)> class AESCipher { static_assert(std::is_same_v<Key, std::array<u8, KeySize>>, "Key must be std::array of u8."); static_assert(KeySize == 0x10 || KeySize == 0x20, "KeySize must be 128 or 256."); @@ -38,25 +38,25 @@ public: void SetIV(std::vector<u8> iv); template <typename Source, typename Dest> - void Transcode(const Source* src, size_t size, Dest* dest, Op op) const { + void Transcode(const Source* src, std::size_t size, Dest* dest, Op op) const { static_assert(std::is_trivially_copyable_v<Source> && std::is_trivially_copyable_v<Dest>, "Transcode source and destination types must be trivially copyable."); Transcode(reinterpret_cast<const u8*>(src), size, reinterpret_cast<u8*>(dest), op); } - void Transcode(const u8* src, size_t size, u8* dest, Op op) const; + void Transcode(const u8* src, std::size_t size, u8* dest, Op op) const; template <typename Source, typename Dest> - void XTSTranscode(const Source* src, size_t size, Dest* dest, size_t sector_id, - size_t sector_size, Op op) { + void XTSTranscode(const Source* src, std::size_t size, Dest* dest, std::size_t sector_id, + std::size_t sector_size, Op op) { static_assert(std::is_trivially_copyable_v<Source> && std::is_trivially_copyable_v<Dest>, "XTSTranscode source and destination types must be trivially copyable."); XTSTranscode(reinterpret_cast<const u8*>(src), size, reinterpret_cast<u8*>(dest), sector_id, sector_size, op); } - void XTSTranscode(const u8* src, size_t size, u8* dest, size_t sector_id, size_t sector_size, - Op op); + void XTSTranscode(const u8* src, std::size_t size, u8* dest, std::size_t sector_id, + std::size_t sector_size, Op op); private: std::unique_ptr<CipherContext> ctx; |