StormByte C++ Library: Crypto module 0.0.9999
StormByte-Crypto is a StormByte library module for handling cryptographic operations
Loading...
Searching...
No Matches
camellia.hxx
1#pragma once
2
3#include <StormByte/crypto/crypter/symmetric/generic.hxx>
4
9namespace StormByte::Crypto::Crypter {
14 class STORMBYTE_CRYPTO_PUBLIC Camellia final: public Symmetric {
15 public:
20 inline Camellia(const std::string& password):
21 Symmetric(Type::Camellia, password) {}
22
27 Camellia(const Camellia& other) = default;
28
33 Camellia(Camellia&& other) noexcept = default;
34
38 virtual ~Camellia() noexcept = default;
39
45 Camellia& operator=(const Camellia& other) = default;
46
52 Camellia& operator=(Camellia&& other) noexcept = default;
53
58 inline PointerType Clone() const noexcept override {
59 return std::make_shared<Camellia>(*this);
60 }
61
66 inline PointerType Move() noexcept override {
67 return std::make_shared<Camellia>(std::move(*this));
68 }
69
70 private:
77 bool DoEncrypt(std::span<const std::byte> input, Buffer::WriteOnly& output) const noexcept override;
78
85 Buffer::Consumer DoEncrypt(Buffer::Consumer consumer, ReadMode mode) const noexcept override;
86
93 bool DoDecrypt(std::span<const std::byte> input, Buffer::WriteOnly& output) const noexcept override;
94
101 Buffer::Consumer DoDecrypt(Buffer::Consumer consumer, ReadMode mode) const noexcept override;
102 };
103}
A symmetric crypter class.
Definition camellia.hxx:14
Camellia(Camellia &&other) noexcept=default
Move constructor.
Camellia(const std::string &password)
Constructor.
Definition camellia.hxx:20
PointerType Move() noexcept override
Move the Camellia crypter.
Definition camellia.hxx:66
Camellia(const Camellia &other)=default
Copy constructor.
virtual ~Camellia() noexcept=default
Virtual destructor.
A generic symmetric crypter class.
Definition generic.hxx:16