Botan 3.6.1
Crypto and TLS for C&
|
#include <pubkey.h>
Public Member Functions | |
size_t | ciphertext_length (size_t ptext_len) const override |
std::vector< uint8_t > | encrypt (const uint8_t in[], size_t length, RandomNumberGenerator &rng) const |
std::vector< uint8_t > | encrypt (std::span< const uint8_t > in, RandomNumberGenerator &rng) const |
size_t | maximum_input_size () const override |
PK_Encryptor_EME & | operator= (const PK_Encryptor_EME &)=delete |
PK_Encryptor_EME & | operator= (PK_Encryptor_EME &&) noexcept |
PK_Encryptor_EME (const PK_Encryptor_EME &)=delete | |
PK_Encryptor_EME (const Public_Key &key, RandomNumberGenerator &rng, std::string_view padding, std::string_view provider="") | |
PK_Encryptor_EME (PK_Encryptor_EME &&) noexcept | |
~PK_Encryptor_EME () override | |
Encryption using a standard message recovery algorithm like RSA or ElGamal, paired with an encoding scheme like OAEP.
Botan::PK_Encryptor_EME::PK_Encryptor_EME | ( | const Public_Key & | key, |
RandomNumberGenerator & | rng, | ||
std::string_view | padding, | ||
std::string_view | provider = "" ) |
Construct an instance.
key | the key to use inside the encryptor |
rng | the RNG to use |
padding | the message encoding scheme to use (eg "OAEP(SHA-256)") |
provider | the provider to use |
Definition at line 87 of file pubkey.cpp.
References Botan::Asymmetric_Key::algo_name(), Botan::Public_Key::create_encryption_op(), and Botan::fmt().
|
overridedefault |
|
delete |
|
defaultnoexcept |
|
overridevirtual |
Return an upper bound on the ciphertext length for a particular plaintext input length
Implements Botan::PK_Encryptor.
Definition at line 102 of file pubkey.cpp.
References ciphertext_length().
Referenced by ciphertext_length().
|
inlineinherited |
Encrypt a message.
in | the message as a byte array |
length | the length of the above byte array |
rng | the random number source to use |
Definition at line 37 of file pubkey.h.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), and Botan::KeyPair::encryption_consistency_check().
|
inlineinherited |
|
overridevirtual |
Return the maximum allowed message size in bytes.
Implements Botan::PK_Encryptor.
Definition at line 110 of file pubkey.cpp.
Referenced by Botan::KeyPair::encryption_consistency_check().
|
delete |
|
defaultnoexcept |