Botan  1.10.10
Public Member Functions | List of all members
Botan::PK_Encryptor_EME Class Reference

#include <pubkey.h>

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

Public Member Functions

std::vector< byteencrypt (const byte in[], size_t length, RandomNumberGenerator &rng) const
 
template<typename Alloc >
std::vector< byteencrypt (const std::vector< byte, Alloc > &in, RandomNumberGenerator &rng) const
 
size_t maximum_input_size () const override
 
 PK_Encryptor_EME (const Public_Key &key, const std::string &eme)
 

Detailed Description

Encryption with an MR algorithm and an EME.

Definition at line 377 of file pubkey.h.

Constructor & Destructor Documentation

Botan::PK_Encryptor_EME::PK_Encryptor_EME ( const Public_Key key,
const std::string &  eme 
)

Construct an instance.

Parameters
keythe key to use inside the decryptor
emethe EME to use

Definition at line 28 of file pubkey.cpp.

29  {
30  m_op.reset(get_pk_op<PK_Ops::Encryption>("Encryption", key, eme));
31  }

Member Function Documentation

std::vector<byte> Botan::PK_Encryptor::encrypt ( const byte  in[],
size_t  length,
RandomNumberGenerator rng 
) const
inlineinherited

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 40 of file pubkey.h.

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

42  {
43  return enc(in, length, rng);
44  }
template<typename Alloc >
std::vector<byte> Botan::PK_Encryptor::encrypt ( const std::vector< byte, Alloc > &  in,
RandomNumberGenerator rng 
) const
inlineinherited

Encrypt a message.

Parameters
inthe message
rngthe random number source to use
Returns
encrypted message

Definition at line 53 of file pubkey.h.

55  {
56  return enc(in.data(), in.size(), rng);
57  }
size_t Botan::PK_Encryptor_EME::maximum_input_size ( ) const
overridevirtual

Return the maximum allowed message size in bytes.

Returns
maximum message size in bytes

Implements Botan::PK_Encryptor.

Definition at line 39 of file pubkey.cpp.

Referenced by Botan::KeyPair::encryption_consistency_check().

40  {
41  return m_op->max_input_bits() / 8;
42  }

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