3#include <StormByte/crypto/crypter/asymmetric/generic.hxx>
4#include <StormByte/crypto/keypair/rsa.hxx>
10namespace StormByte::Crypto::Crypter {
21 inline RSA(KeyPair::Generic::PointerType keypair):
53 virtual ~RSA() noexcept = default;
60 RSA& operator=(const
RSA& other) = default;
67 RSA& operator=(
RSA&& other) noexcept = default;
73 inline PointerType Clone() const noexcept
override {
74 return std::make_shared<RSA>(*
this);
81 inline PointerType
Move() noexcept
override {
82 return std::make_shared<RSA>(std::move(*
this));
92 bool DoEncrypt(std::span<const std::byte> input, Buffer::WriteOnly& output)
const noexcept override;
100 Buffer::Consumer DoEncrypt(Buffer::Consumer consumer, ReadMode mode)
const noexcept override;
108 bool DoDecrypt(std::span<const std::byte> input, Buffer::WriteOnly& output)
const noexcept override;
116 Buffer::Consumer DoDecrypt(Buffer::Consumer consumer, ReadMode mode)
const noexcept override;
A generic asymmetric crypter class.
Definition generic.hxx:15
An asymmetric crypter class.
Definition rsa.hxx:15
RSA(const KeyPair::RSA &keypair)
Constructor.
Definition rsa.hxx:28
RSA(KeyPair::Generic::PointerType keypair)
Constructor.
Definition rsa.hxx:21
virtual ~RSA() noexcept=default
Virtual destructor.
RSA(const RSA &other)=default
Copy constructor.
RSA(RSA &&other) noexcept=default
Move constructor.
RSA(KeyPair::RSA &&keypair)
Constructor.
Definition rsa.hxx:35
PointerType Move() noexcept override
Move the RSA crypter.
Definition rsa.hxx:81
The namespace containing all the keypair-related classes.