Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
Botan::PK_Ops::Encryption_with_EME Class Referenceabstract

`#include <pk_ops_impl.h>`

Inheritance diagram for Botan::PK_Ops::Encryption_with_EME:

## Public Member Functions
secure_vector< uint8_t > | encrypt (const uint8_t msg[], size_t msg_len, RandomNumberGenerator &rng) override
size_t | max_input_bits () const override
| ~Encryption_with_EME ()=default

## Protected Member Functions
| Encryption_with_EME (const std::string &eme)

## Detailed Description

Definition at line 20 of file pk_ops_impl.h.

## Constructor & Destructor Documentation

Botan::PK_Ops::Encryption_with_EME::~Encryption_with_EME | ( |  | ) |
| default

Botan::PK_Ops::Encryption_with_EME::Encryption_with_EME | ( | const std::string & | eme | ) |
| explicit protected

Definition at line 13 of file pk_ops.cpp.

References Botan::get_eme().

14 {
15 m_eme.reset(get_eme(eme));
16 if(!m_eme.get())
17 throw Algorithm_Not_Found(eme);
18 }
Botan::get_eme
EME * get_eme(const std::string &algo_spec)
Definition: eme.cpp:25

## Member Function Documentation

secure_vector< uint8_t > Botan::PK_Ops::Encryption_with_EME::encrypt | ( | const uint8_t | msg[],
|  | size_t | msg_len,
|  | RandomNumberGenerator & | rng
| ) |  |
| override virtual

Implements Botan::PK_Ops::Encryption.

Definition at line 25 of file pk_ops.cpp.

References Botan::unlock().

27 {
28 const size_t max_raw = max_raw_input_bits();
29 const std::vector<uint8_t> encoded = unlock(m_eme->encode(msg, msg_len, max_raw, rng));
30 return raw_encrypt(encoded.data(), encoded.size(), rng);
31 }
Botan::unlock
std::vector< T > unlock(const secure_vector< T > &in)
Definition: secmem.h:125

size_t Botan::PK_Ops::Encryption_with_EME::max_input_bits | ( |  | ) | const
| override virtual

Implements Botan::PK_Ops::Encryption.

Definition at line 20 of file pk_ops.cpp.

21 {
22 return m_eme->maximum_input_size(max_raw_input_bits());
23 }

The documentation for this class was generated from the following files:

- src/lib/pubkey/pk_ops_impl.h
- src/lib/pubkey/pk_ops.cpp