Botan 3.14.1
Crypto and TLS for C&
Botan::PK_Key_Agreement_Options_Reader Class Referencefinal

#include <pk_options_readers.h>

Public Member Functions

const std::optional< std::string > & kdf () const
PK_Key_Agreement_Options_Reader & operator= (const PK_Key_Agreement_Options_Reader &)=delete
PK_Key_Agreement_Options_Reader & operator= (PK_Key_Agreement_Options_Reader &&)=delete
 PK_Key_Agreement_Options_Reader (const PK_Key_Agreement_Options_Reader &)=delete
 PK_Key_Agreement_Options_Reader (PK_Key_Agreement_Options_Reader &&)=delete
const std::optional< std::string > & provider () const
std::string to_string () const
 Format the options as a string, for error messages.
bool using_kdf () const
bool using_provider () const
bool using_raw_shared_key () const
 ~PK_Key_Agreement_Options_Reader ()=default

Friends

class PK_Key_Agreement
class PK_Options_Reader_Access

Detailed Description

Read access to a PK_Key_Agreement_Options

The library creates one of these when a PK_Key_Agreement is constructed and passes it to the key's _create_key_agreement_op; applications never create or hold one.

As with PK_Signature_Options_Reader, each getter records that the scheme examined the option, and any option set but never examined is rejected.

Definition at line 327 of file pk_options_readers.h.

Constructor & Destructor Documentation

◆ PK_Key_Agreement_Options_Reader() [1/2]

Botan::PK_Key_Agreement_Options_Reader::PK_Key_Agreement_Options_Reader ( const PK_Key_Agreement_Options_Reader & )
delete

◆ PK_Key_Agreement_Options_Reader() [2/2]

Botan::PK_Key_Agreement_Options_Reader::PK_Key_Agreement_Options_Reader ( PK_Key_Agreement_Options_Reader && )
delete

◆ ~PK_Key_Agreement_Options_Reader()

Botan::PK_Key_Agreement_Options_Reader::~PK_Key_Agreement_Options_Reader ( )
default

Member Function Documentation

◆ kdf()

const std::optional< std::string > & Botan::PK_Key_Agreement_Options_Reader::kdf ( ) const
inline

Definition at line 338 of file pk_options_readers.h.

338 {
339 note_examined(Option::Kdf);
340 return m_options.m_kdf;
341 }

Referenced by Botan::PK_Ops::Key_Agreement_with_KDF::Key_Agreement_with_KDF(), and using_kdf().

◆ operator=() [1/2]

PK_Key_Agreement_Options_Reader & Botan::PK_Key_Agreement_Options_Reader::operator= ( const PK_Key_Agreement_Options_Reader & )
delete

◆ operator=() [2/2]

PK_Key_Agreement_Options_Reader & Botan::PK_Key_Agreement_Options_Reader::operator= ( PK_Key_Agreement_Options_Reader && )
delete

◆ provider()

const std::optional< std::string > & Botan::PK_Key_Agreement_Options_Reader::provider ( ) const
inline

Definition at line 350 of file pk_options_readers.h.

350 {
351 note_examined(Option::Provider);
352 return m_options.m_provider;
353 }

◆ to_string()

std::string Botan::PK_Key_Agreement_Options_Reader::to_string ( ) const
inline

Format the options as a string, for error messages.

Definition at line 336 of file pk_options_readers.h.

336{ return m_options.to_string(); }

◆ using_kdf()

bool Botan::PK_Key_Agreement_Options_Reader::using_kdf ( ) const
inline

Definition at line 343 of file pk_options_readers.h.

343{ return kdf().has_value(); }
const std::optional< std::string > & kdf() const

References kdf().

Referenced by Botan::PK_Ops::Key_Agreement_with_KDF::Key_Agreement_with_KDF().

◆ using_provider()

bool Botan::PK_Key_Agreement_Options_Reader::using_provider ( ) const

Definition at line 511 of file pk_options.cpp.

511 {
512 note_examined(Option::Provider);
513 return provider_is_in_use(m_options.m_provider);
514}

◆ using_raw_shared_key()

bool Botan::PK_Key_Agreement_Options_Reader::using_raw_shared_key ( ) const
inline

Definition at line 345 of file pk_options_readers.h.

345 {
346 note_examined(Option::RawSharedKey);
347 return m_options.m_raw_shared_key;
348 }

Referenced by Botan::PK_Ops::Key_Agreement_with_KDF::Key_Agreement_with_KDF().

◆ PK_Key_Agreement

friend class PK_Key_Agreement
friend

Definition at line 358 of file pk_options_readers.h.

References PK_Key_Agreement.

Referenced by PK_Key_Agreement.

◆ PK_Options_Reader_Access

friend class PK_Options_Reader_Access
friend

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