Botan 1.10.17
Botan::DLIES_Encryptor Class Reference

#include <dlies.h>

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

Public Member Functions

 DLIES_Encryptor (const PK_Key_Agreement_Key &, KDF *kdf, MessageAuthenticationCode *mac, size_t mac_key_len=20)
SecureVector< byteencrypt (const byte in[], size_t length, RandomNumberGenerator &rng) const
SecureVector< byteencrypt (const MemoryRegion< byte > &in, RandomNumberGenerator &rng) const
void set_other_key (const MemoryRegion< byte > &)
 ~DLIES_Encryptor ()

Detailed Description

DLIES Encryption

Definition at line 20 of file dlies.h.

Constructor & Destructor Documentation

◆ DLIES_Encryptor()

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.

19 :
20 ka(key, "Raw"),
21 kdf(kdf_obj),
22 mac(mac_obj),
23 mac_keylen(mac_kl)
24 {
25 my_key = key.public_value();
26 }

References Botan::PK_Key_Agreement_Key::public_value().

◆ ~DLIES_Encryptor()

Botan::DLIES_Encryptor::~DLIES_Encryptor ( )

Definition at line 28 of file dlies.cpp.

29 {
30 delete kdf;
31 delete mac;
32 }

Member Function Documentation

◆ encrypt() [1/2]

SecureVector< 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 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
inlineinherited

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().

◆ set_other_key()

void Botan::DLIES_Encryptor::set_other_key ( const MemoryRegion< byte > & ok)

Definition at line 74 of file dlies.cpp.

75 {
76 other_key = ok;
77 }

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