Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
Botan::PK_Ops::KEM_Encryption_with_KDF Class Referenceabstract

`#include <pk_ops_impl.h>`

Inheritance diagram for Botan::PK_Ops::KEM_Encryption_with_KDF:

## Public Member Functions
void | kem_encrypt (secure_vector< uint8_t > &out_encapsulated_key, secure_vector< uint8_t > &out_shared_key, size_t desired_shared_key_len, Botan::RandomNumberGenerator &rng, const uint8_t salt[], size_t salt_len) override

## Protected Member Functions
| KEM_Encryption_with_KDF (const std::string &kdf)
virtual void | raw_kem_encrypt (secure_vector< uint8_t > &out_encapsulated_key, secure_vector< uint8_t > &raw_shared_key, Botan::RandomNumberGenerator &rng)=0
| ~KEM_Encryption_with_KDF ()=default

## Detailed Description

Definition at line 185 of file pk_ops_impl.h.

## Constructor & Destructor Documentation

Botan::PK_Ops::KEM_Encryption_with_KDF::KEM_Encryption_with_KDF | ( | const std::string & | kdf | ) |
| explicit protected

Definition at line 148 of file pk_ops.cpp.

References Botan::get_kdf().

149 {
150 m_kdf.reset(get_kdf(kdf));
151 }
Botan::get_kdf
KDF * get_kdf(const std::string &algo_spec)
Definition: kdf.cpp:226

Botan::PK_Ops::KEM_Encryption_with_KDF::~KEM_Encryption_with_KDF | ( |  | ) |
| protected default

## Member Function Documentation

void Botan::PK_Ops::KEM_Encryption_with_KDF::kem_encrypt | ( | secure_vector< uint8_t > & | out_encapsulated_key,
|  | secure_vector< uint8_t > & | out_shared_key,
|  | size_t | desired_shared_key_len,
|  | Botan::RandomNumberGenerator & | rng,
|  | const uint8_t | salt[],
|  | size_t | salt_len
| ) |  |
| override virtual

Implements Botan::PK_Ops::KEM_Encryption.

Definition at line 133 of file pk_ops.cpp.

139 {
140 secure_vector<uint8_t> raw_shared;
141 this->raw_kem_encrypt(out_encapsulated_key, raw_shared, rng);
142
143 out_shared_key = m_kdf->derive_key(desired_shared_key_len,
144 raw_shared.data(), raw_shared.size(),
145 salt, salt_len);
146 }
Botan::PK_Ops::KEM_Encryption_with_KDF::raw_kem_encrypt
virtual void raw_kem_encrypt(secure_vector< uint8_t > &out_encapsulated_key, secure_vector< uint8_t > &raw_shared_key, Botan::RandomNumberGenerator &rng)=0

virtual void Botan::PK_Ops::KEM_Encryption_with_KDF::raw_kem_encrypt | ( | secure_vector< uint8_t > & | out_encapsulated_key,
|  | secure_vector< uint8_t > & | raw_shared_key,
|  | Botan::RandomNumberGenerator & | rng
| ) |  |
| protected pure virtual

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

- src/lib/pubkey/pk_ops_impl.h
- src/lib/pubkey/pk_ops.cpp