Botan 1.10.17
Botan::PK_Encryptor Class Referenceabstract

#include <pubkey.h>

Inheritance diagram for Botan::PK_Encryptor:
Botan::DLIES_Encryptor Botan::PK_Encryptor_EME

Public Member Functions

SecureVector< byteencrypt (const byte in[], size_t length, RandomNumberGenerator &rng) const
SecureVector< byteencrypt (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 ( )
inlinevirtual

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
inthe message as a byte array
lengththe length of the above byte array
rngthe random number source to use
Returns
encrypted message

Definition at line 48 of file pubkey.h.

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

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

◆ encrypt() [2/2]

SecureVector< byte > Botan::PK_Encryptor::encrypt ( const MemoryRegion< byte > & in,
RandomNumberGenerator & rng ) const
inline

Encrypt a message.

Parameters
inthe message
rngthe 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 }

References Botan::MemoryRegion< T >::size().

◆ 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: