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