diff options
| author | 2018-07-29 19:00:09 -0400 | |
|---|---|---|
| committer | 2018-08-01 00:16:54 -0400 | |
| commit | 03149d3e4a7f8038d9c88cbeb19dee25a39e0042 (patch) | |
| tree | cae04a5eefd883d1a665d9502370ec5ff9faa3fd /src/core/crypto/aes_util.h | |
| parent | Allow key loading from %YUZU_DIR%/keys in addition to ~/.switch (diff) | |
| download | yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.tar.gz yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.tar.xz yuzu-03149d3e4a7f8038d9c88cbeb19dee25a39e0042.zip | |
Add missing includes and use const where applicable
Diffstat (limited to 'src/core/crypto/aes_util.h')
| -rw-r--r-- | src/core/crypto/aes_util.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/crypto/aes_util.h b/src/core/crypto/aes_util.h index fa77d5560..5b0b02738 100644 --- a/src/core/crypto/aes_util.h +++ b/src/core/crypto/aes_util.h | |||
| @@ -4,11 +4,16 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <memory> | ||
| 8 | #include <type_traits> | ||
| 9 | #include <vector> | ||
| 7 | #include "common/assert.h" | 10 | #include "common/assert.h" |
| 8 | #include "core/file_sys/vfs.h" | 11 | #include "core/file_sys/vfs.h" |
| 9 | 12 | ||
| 10 | namespace Core::Crypto { | 13 | namespace Core::Crypto { |
| 11 | 14 | ||
| 15 | struct CipherContext; | ||
| 16 | |||
| 12 | enum class Mode { | 17 | enum class Mode { |
| 13 | CTR = 11, | 18 | CTR = 11, |
| 14 | ECB = 2, | 19 | ECB = 2, |
| @@ -20,8 +25,6 @@ enum class Op { | |||
| 20 | Decrypt, | 25 | Decrypt, |
| 21 | }; | 26 | }; |
| 22 | 27 | ||
| 23 | struct CipherContext; | ||
| 24 | |||
| 25 | template <typename Key, size_t KeySize = sizeof(Key)> | 28 | template <typename Key, size_t KeySize = sizeof(Key)> |
| 26 | class AESCipher { | 29 | class AESCipher { |
| 27 | static_assert(std::is_same_v<Key, std::array<u8, KeySize>>, "Key must be std::array of u8."); | 30 | static_assert(std::is_same_v<Key, std::array<u8, KeySize>>, "Key must be std::array of u8."); |