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 | List of all members
Botan::PK_Encryptor Class Referenceabstract

`#include <pubkey.h>`

Inheritance diagram for Botan::PK_Encryptor:

## Public Member Functions
std::vector< uint8_t > | encrypt (const uint8_t in[], size_t length, RandomNumberGenerator &rng) const
template<typename Alloc >
std::vector< uint8_t > | encrypt (const std::vector< uint8_t, Alloc > &in, RandomNumberGenerator &rng) const
virtual size_t | maximum_input_size () const =0
PK_Encryptor & | operator= (const PK_Encryptor &)=delete
| PK_Encryptor ()=default
| PK_Encryptor (const PK_Encryptor &)=delete
virtual | ~PK_Encryptor ()=default

## Detailed Description

Public Key Encryptor This is the primary interface for public key encryption

Definition at line 35 of file pubkey.h.

## Constructor & Destructor Documentation

Botan::PK_Encryptor::PK_Encryptor | ( |  | ) |
| default

virtual Botan::PK_Encryptor::~PK_Encryptor | ( |  | ) |
| virtual default

Botan::PK_Encryptor::PK_Encryptor | ( | const PK_Encryptor & |  | ) |
| delete

## Member Function Documentation

std::vector<uint8_t> Botan::PK_Encryptor::encrypt | ( | const uint8_t | in[],
|  | size_t | length,
|  | RandomNumberGenerator & | rng
| ) |  | const
| inline

Encrypt a message.

Parameters

  in | the message as a byte array
  length | the length of the above byte array
  rng | the random number source to use

Returns
  encrypted message

Definition at line 46 of file pubkey.h.

Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), and Botan::KeyPair::encryption_consistency_check().

48 {
49 return enc(in, length, rng);
50 }
template<typename Alloc >

std::vector<uint8_t> Botan::PK_Encryptor::encrypt | ( | const std::vector< uint8_t, Alloc > & | in,
|  | RandomNumberGenerator & | rng
| ) |  | const
| inline

Encrypt a message.

Parameters

  in | the message
  rng | the random number source to use

Returns
  encrypted message

Definition at line 59 of file pubkey.h.

61 {
62 return enc(in.data(), in.size(), rng);
63 }

virtual size_t Botan::PK_Encryptor::maximum_input_size | ( |  | ) | const
| pure virtual

Return the maximum allowed message size in bytes.

Returns
  maximum message size in bytes

Implemented in Botan::PK_Encryptor_EME.

PK_Encryptor& Botan::PK_Encryptor::operator= | ( | const PK_Encryptor & |  | ) |
| delete

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

- src/lib/pubkey/pubkey.h