Botan 1.10.17

Public Member Functions | List of all members
Botan::PK_Encryptor Class Referenceabstract

`#include <pubkey.h>`

Inheritance diagram for Botan::PK_Encryptor:

## Public Member Functions
SecureVector< byte > | encrypt (const byte in[], size_t length, RandomNumberGenerator &rng) const
SecureVector< byte > | encrypt (const MemoryRegion< byte > &in, RandomNumberGenerator &rng) const
virtual size_t | maximum_input_size () const =0
| PK_Encryptor ()
virtual | ~PK_Encryptor ()

## Detailed Description

Public Key Encryptor

Definition at line 37 of file pubkey.h.

## Constructor & Destructor Documentation

## ◆ PK_Encryptor()

Botan::PK_Encryptor::PK_Encryptor | ( |  | ) |
| inline

Definition at line 72 of file pubkey.h.

72 {}

## ◆ ~PK_Encryptor()

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

Definition at line 73 of file pubkey.h.

73 {}

## Member Function Documentation

## ◆ encrypt() [1/2]

SecureVector<byte> Botan::PK_Encryptor::encrypt | ( | const byte | 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 48 of file pubkey.h.

Referenced by Botan::PK_Encryptor_Filter::end_msg().

50 {
51 return enc(in, length, rng);
52 }

## ◆ encrypt() [2/2]

SecureVector<byte> Botan::PK_Encryptor::encrypt | ( | const MemoryRegion< byte > & | 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 60 of file pubkey.h.

62 {
63 return enc(&in[0], in.size(), rng);
64 }
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29

## ◆ maximum_input_size()

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.

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

- src/pubkey/pubkey.h