summaryrefslogtreecommitdiff
path: root/src/core/crypto/aes_util.h
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-07-29 19:00:09 -0400
committerGravatar Zach Hilman2018-08-01 00:16:54 -0400
commit03149d3e4a7f8038d9c88cbeb19dee25a39e0042 (patch)
treecae04a5eefd883d1a665d9502370ec5ff9faa3fd /src/core/crypto/aes_util.h
parentAllow key loading from %YUZU_DIR%/keys in addition to ~/.switch (diff)
downloadyuzu-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.h7
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
10namespace Core::Crypto { 13namespace Core::Crypto {
11 14
15struct CipherContext;
16
12enum class Mode { 17enum 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
23struct CipherContext;
24
25template <typename Key, size_t KeySize = sizeof(Key)> 28template <typename Key, size_t KeySize = sizeof(Key)>
26class AESCipher { 29class 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.");