Enigma 3.2.2
A Simple, Reliable and Efficient Encryption Tool
Loading...
Searching...
No Matches
Serpent.hpp
Go to the documentation of this file.
1#pragma once
3
12class Serpent : public Algorithm {
13 public:
17 explicit Serpent(const Algorithm::Intent intent) noexcept;
18 ~Serpent() noexcept override;
19
20 public:
21 std::vector<byte> Encrypt(const std::string& password, const byte *buffer, const std::size_t buffSize) override;
22 std::vector<byte> Encrypt(const std::string& password, const std::vector<byte>& buffer) override;
23 std::vector<byte> Decrypt(const std::string& password, const byte *cipher, const std::size_t cipherSize) override;
24 std::vector<byte> Decrypt(const std::string& password, const std::vector<byte>& cipher) override;
25 void Encrypt(const std::string& password, const fs::path& in_filename, const fs::path& out_filename) override;
26 void Decrypt(const std::string& password, const fs::path& in_filename, const fs::path& out_filename) override;
27
28 private:
29 std::unique_ptr<CryptoPP::GCM<CryptoPP::Serpent>::Encryption> m_serpent_encryptor;
30 std::unique_ptr<CryptoPP::GCM<CryptoPP::Serpent>::Decryption> m_serpent_decryptor;
31};
32
#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
Serpent(const Algorithm::Intent intent) noexcept
~Serpent() noexcept override