Botan  1.11.15
Public Member Functions
Botan::DLIES_Encryptor Class Reference

#include <dlies.h>

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

List of all members.

Public Member Functions

 DLIES_Encryptor (const PK_Key_Agreement_Key &, KDF *kdf, MessageAuthenticationCode *mac, size_t mac_key_len=20)
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
void set_other_key (const std::vector< byte > &)

Detailed Description

DLIES Encryption

Definition at line 20 of file dlies.h.


Constructor & Destructor Documentation

Botan::DLIES_Encryptor::DLIES_Encryptor ( const PK_Key_Agreement_Key key,
KDF kdf,
MessageAuthenticationCode mac,
size_t  mac_key_len = 20 
)

Definition at line 16 of file dlies.cpp.

References Botan::PK_Key_Agreement_Key::public_value().

                                                :
   ka(key, "Raw"),
   kdf(kdf_obj),
   mac(mac_obj),
   mac_keylen(mac_kl)
   {
   my_key = key.public_value();
   }

Member Function Documentation

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

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::TLS::Client_Key_Exchange::Client_Key_Exchange(), and Botan::KeyPair::encryption_consistency_check().

         {
         return enc(in, length, rng);
         }
template<typename Alloc >
std::vector<byte> Botan::PK_Encryptor::encrypt ( const std::vector< byte, Alloc > &  in,
RandomNumberGenerator rng 
) const [inline, inherited]

Encrypt a message.

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

Definition at line 61 of file pubkey.h.

         {
         return enc(&in[0], in.size(), rng);
         }
void Botan::DLIES_Encryptor::set_other_key ( const std::vector< byte > &  ok)

Definition at line 68 of file dlies.cpp.

   {
   other_key = ok;
   }

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