Keypair-based asymmetric crypter.
Definition generic.hxx:71
bool Encrypt(const Buffer::ReadOnly &input, Buffer::WriteOnly &output, Strategy strategy=Strategy::Native) const noexcept
Encrypt a read-only buffer (copy).
bool Encrypt(Buffer::ReadOnly &input, Buffer::WriteOnly &output, Strategy strategy=Strategy::Native) const noexcept
Encrypt a buffer, consuming it.
Asymmetric(enum Type type, const KeyPair::Generic &keypair)
Construct by cloning a keypair.
Definition generic.hxx:220
Asymmetric(Asymmetric &&other) noexcept=default
Move constructor.
bool Decrypt(const Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
Decrypt a read-only buffer (copy).
bool Encrypt(std::span< const std::byte > input, Buffer::WriteOnly &output, Strategy strategy=Strategy::Native) const noexcept
Encrypt a byte span.
Buffer::Consumer Decrypt(Buffer::Consumer consumer, ReadMode mode=ReadMode::Move) const noexcept
Decrypt a Consumer.
Buffer::Consumer Encrypt(Buffer::Consumer consumer, Strategy strategy=Strategy::Native, ReadMode mode=ReadMode::Move) const noexcept
Encrypt a Consumer.
Asymmetric(const Asymmetric &other)=default
Copy constructor.
Strategy
How payload bytes are sealed.
Definition generic.hxx:77
@ Native
Pure asymmetric encryption.
Definition generic.hxx:79
Asymmetric(enum Type type, KeyPair::Generic &&keypair)
Construct by moving a keypair.
Definition generic.hxx:228
virtual ~Asymmetric() noexcept override
Destructor.
KeyPair::Generic::PointerType KeyPair() const noexcept
Keypair used by this crypter.
Definition generic.hxx:122
KeyPair::Generic::PointerType m_keypair
Shared keypair.
Definition generic.hxx:205
Asymmetric(enum Type type, KeyPair::Generic::PointerType keypair)
Construct from a keypair pointer.
Definition generic.hxx:212
bool Decrypt(Buffer::ReadOnly &input, Buffer::WriteOnly &output) const noexcept
Decrypt a buffer, consuming it.
bool Decrypt(std::span< const std::byte > input, Buffer::WriteOnly &output) const noexcept
Decrypt a byte span.
Generic(const Generic &other)=default
Copy constructor.
Abstract keypair.
Definition generic.hxx:113
virtual PointerType Clone() const =0
virtual PointerType Move()=0
STORMBYTE_DECLARE_MAYBE_SAFE(class StormByte::System::Device::Access)
Ciphers of the Crypto module.
Generic::PointerType Create(enum Type type, KeyPair::Generic::PointerType keypair) noexcept
Factory from a keypair pointer.
Crypto module of the StormByte suite.
Definition aead.hxx:53
ReadMode
How a source buffer is consumed.
Definition typedefs.hxx:57
@ Move
Consume the input.
Definition typedefs.hxx:59
Root namespace of the StormByte suite.
#define STORMBYTE_CRYPTO_PUBLIC
Definition visibility.h:53