Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
AES.hpp
Go to the documentation of this file.
1 #pragma once
3 
10 class AES : public Algorithm {
11  public:
15  explicit AES(const Algorithm::Intent intent) noexcept;
16  ~AES() noexcept override;
17 
18  public:
19  std::vector<byte> Encrypt(const std::string& password, const byte *buffer, const std::size_t buffSize) override;
20  std::vector<byte> Encrypt(const std::string& password, const std::vector<byte>& buffer) override;
21  std::vector<byte> Decrypt(const std::string& password, const byte *cipher, const std::size_t cipherSize) override;
22  std::vector<byte> Decrypt(const std::string& password, const std::vector<byte>& cipher) override;
23  void Encrypt(const std::string& password, const fs::path& in_filename, const fs::path& out_filename) override;
24  void Decrypt(const std::string& password, const fs::path& in_filename, const fs::path& out_filename) override;
25 
26  private:
27  std::unique_ptr<CryptoPP::GCM<CryptoPP::AES>::Encryption> m_aes_encryptor;
28  std::unique_ptr<CryptoPP::GCM<CryptoPP::AES>::Decryption> m_aes_decryptor;
29 };
30 
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition: Macros.hpp:13
#define NS_ENIGMA_END
Definition: Macros.hpp:14
Definition: AES.hpp:10
AES(const Algorithm::Intent intent) noexcept
std::vector< byte > Encrypt(const std::string &password, const byte *buffer, const std::size_t buffSize) override
~AES() noexcept override
std::vector< byte > Decrypt(const std::string &password, const byte *cipher, const std::size_t cipherSize) override
Algorithm abstract class.
Definition: Algorithm.hpp:53