Botan  1.10.9
Public Member Functions | List of all members
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

Botan::PK_Encryptor::PK_Encryptor ( )
inline

Definition at line 72 of file pubkey.h.

72 {}
virtual Botan::PK_Encryptor::~PK_Encryptor ( )
inlinevirtual

Definition at line 73 of file pubkey.h.

73 {}

Member Function Documentation

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.

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

50  {
51  return enc(in, length, rng);
52  }
RandomNumberGenerator * rng
Definition: global_rng.cpp:165
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.

References rng, and Botan::MemoryRegion< T >::size().

62  {
63  return enc(&in[0], in.size(), rng);
64  }
RandomNumberGenerator * rng
Definition: global_rng.cpp:165
size_t size() const
Definition: secmem.h:29
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: