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

#include <pubkey.h>

Public Member Functions

SymmetricKey derive_key (size_t key_len, const byte in[], size_t in_len, const byte params[], size_t params_len) const
 
SymmetricKey derive_key (size_t key_len, const std::vector< byte > &in, const byte params[], size_t params_len) const
 
SymmetricKey derive_key (size_t key_len, const byte in[], size_t in_len, const std::string &params="") const
 
SymmetricKey derive_key (size_t key_len, const std::vector< byte > &in, const std::string &params="") const
 
 PK_Key_Agreement (const Private_Key &key, const std::string &kdf)
 

Detailed Description

Key used for key agreement

Definition at line 298 of file pubkey.h.

Constructor & Destructor Documentation

Botan::PK_Key_Agreement::PK_Key_Agreement ( const Private_Key key,
const std::string &  kdf 
)

Construct a PK Key Agreement.

Parameters
keythe key to use
kdfname of the KDF to use (or 'Raw' for no KDF)

Definition at line 54 of file pubkey.cpp.

55  {
56  m_op.reset(get_pk_op<PK_Ops::Key_Agreement>("Key agreement", key, kdf));
57  }

Member Function Documentation

SymmetricKey Botan::PK_Key_Agreement::derive_key ( size_t  key_len,
const byte  in[],
size_t  in_len,
const byte  params[],
size_t  params_len 
) const

Definition at line 59 of file pubkey.cpp.

Referenced by botan_pk_op_key_agreement(), and Botan::TLS::Client_Key_Exchange::Client_Key_Exchange().

63  {
64  return m_op->agree(key_len, in, in_len, salt, salt_len);
65  }
SymmetricKey Botan::PK_Key_Agreement::derive_key ( size_t  key_len,
const std::vector< byte > &  in,
const byte  params[],
size_t  params_len 
) const
inline

Definition at line 324 of file pubkey.h.

328  {
329  return derive_key(key_len, in.data(), in.size(),
330  params, params_len);
331  }
SymmetricKey derive_key(size_t key_len, const byte in[], size_t in_len, const byte params[], size_t params_len) const
Definition: pubkey.cpp:59
SymmetricKey Botan::PK_Key_Agreement::derive_key ( size_t  key_len,
const byte  in[],
size_t  in_len,
const std::string &  params = "" 
) const
inline

Definition at line 340 of file pubkey.h.

343  {
344  return derive_key(key_len, in, in_len,
345  reinterpret_cast<const byte*>(params.data()),
346  params.length());
347  }
SymmetricKey derive_key(size_t key_len, const byte in[], size_t in_len, const byte params[], size_t params_len) const
Definition: pubkey.cpp:59
SymmetricKey Botan::PK_Key_Agreement::derive_key ( size_t  key_len,
const std::vector< byte > &  in,
const std::string &  params = "" 
) const
inline

Definition at line 355 of file pubkey.h.

358  {
359  return derive_key(key_len, in.data(), in.size(),
360  reinterpret_cast<const byte*>(params.data()),
361  params.length());
362  }
SymmetricKey derive_key(size_t key_len, const byte in[], size_t in_len, const byte params[], size_t params_len) const
Definition: pubkey.cpp:59
std::uint8_t byte
Definition: types.h:31

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