diff options
Diffstat (limited to 'src/core/crypto/ctr_encryption_layer.h')
-rw-r--r-- | src/core/crypto/ctr_encryption_layer.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/crypto/ctr_encryption_layer.h b/src/core/crypto/ctr_encryption_layer.h index fe53e714b..697d7c6a5 100644 --- a/src/core/crypto/ctr_encryption_layer.h +++ b/src/core/crypto/ctr_encryption_layer.h @@ -4,19 +4,20 @@ #pragma once -#include "aes_util.h" -#include "encryption_layer.h" -#include "key_manager.h" +#include "core/crypto/aes_util.h" +#include "core/crypto/encryption_layer.h" +#include "core/crypto/key_manager.h" -namespace Crypto { +namespace Core::Crypto { // Sits on top of a VirtualFile and provides CTR-mode AES decription. -struct CTREncryptionLayer : public EncryptionLayer { +class CTREncryptionLayer : public EncryptionLayer { +public: CTREncryptionLayer(FileSys::VirtualFile base, Key128 key, size_t base_offset); size_t Read(u8* data, size_t length, size_t offset) const override; - void SetIV(std::vector<u8> iv); + void SetIV(const std::vector<u8>& iv); private: size_t base_offset; @@ -28,4 +29,4 @@ private: void UpdateIV(size_t offset) const; }; -} // namespace Crypto +} // namespace Core::Crypto |