#include <pk_ops_impl.h>
Definition at line 18 of file pk_ops_impl.h.
◆ ~Encryption_with_EME()
Botan::PK_Ops::Encryption_with_EME::~Encryption_with_EME |
( |
| ) |
|
|
overridedefault |
◆ Encryption_with_EME()
Botan::PK_Ops::Encryption_with_EME::Encryption_with_EME |
( |
std::string_view | eme | ) |
|
|
explicitprotected |
Definition at line 28 of file pk_ops.cpp.
static std::unique_ptr< EME > create(std::string_view algo_spec)
◆ ciphertext_length()
virtual size_t Botan::PK_Ops::Encryption::ciphertext_length |
( |
size_t | ptext_len | ) |
const |
|
pure virtualinherited |
Given the plaintext length, return an upper bound of the ciphertext length for this key and padding.
◆ encrypt()
std::vector< uint8_t > Botan::PK_Ops::Encryption_with_EME::encrypt |
( |
std::span< const uint8_t > | msg, |
|
|
RandomNumberGenerator & | rng ) |
|
overridevirtual |
Encrypt a message returning the ciphertext
Implements Botan::PK_Ops::Encryption.
Definition at line 34 of file pk_ops.cpp.
34 {
35 const size_t max_raw = max_ptext_input_bits();
37 size_t written = m_eme->pad(eme_output, msg, max_raw, rng);
38 return raw_encrypt(std::span{eme_output}.first(written), rng);
39}
std::vector< T, secure_allocator< T > > secure_vector
◆ max_input_bits()
size_t Botan::PK_Ops::Encryption_with_EME::max_input_bits |
( |
| ) |
const |
|
overridevirtual |
Return the maximum input size for this key
Implements Botan::PK_Ops::Encryption.
Definition at line 30 of file pk_ops.cpp.
30 {
31 return 8 * m_eme->maximum_input_size(max_ptext_input_bits());
32}
The documentation for this class was generated from the following files: