Botan: Botan::DLIES_Encryptor Class Reference

Botan 1.10.16

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

`#include <dlies.h>`

Inheritance diagram for Botan::DLIES_Encryptor:

## Public Member Functions
| DLIES_Encryptor (const PK_Key_Agreement_Key &, KDF *kdf, MessageAuthenticationCode *mac, size_t mac_key_len=20)
SecureVector< byte > | encrypt (const byte in[], size_t length, RandomNumberGenerator &rng) const
SecureVector< byte > | encrypt (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 }

## ◆ ~DLIES_Encryptor()

Botan::DLIES_Encryptor::~DLIES_Encryptor | ( |  | ) |

Definition at line 28 of file dlies.cpp.

References Botan::OctetString::begin(), Botan::OctetString::bits_of(), Botan::MemoryRegion< T >::copy(), Botan::KDF::derive_key(), Botan::PK_Key_Agreement::derive_key(), Botan::MemoryRegion< T >::empty(), Botan::Buffered_Computation::final(), Botan::OctetString::length(), Botan::Buffered_Computation::output_length(), Botan::SymmetricAlgorithm::set_key(), Botan::MemoryRegion< T >::size(), Botan::Buffered_Computation::update(), and Botan::xor_buf().

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

  in | the message as a byte array
  length | the length of the above byte array
  rng | the random number source to use

Returns
  encrypted message

Definition at line 48 of file pubkey.h.

Referenced by Botan::PK_Encryptor_Filter::end_msg().

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

## ◆ encrypt() [2/2]

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

Encrypt a message.

Parameters

  in | the message
  rng | the 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 }
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29

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

- src/pubkey/dlies/dlies.h
- src/pubkey/dlies/dlies.cpp