Botan 3.6.1
Crypto and TLS for C&
|
#include <psk_db.h>
Public Member Functions | |
virtual secure_vector< uint8_t > | get (std::string_view name) const =0 |
std::string | get_str (std::string_view name) const |
virtual bool | is_encrypted () const =0 |
virtual std::set< std::string > | list_names () const =0 |
virtual void | remove (std::string_view name)=0 |
virtual void | set (std::string_view name, const uint8_t psk[], size_t psk_len)=0 |
void | set_str (std::string_view name, std::string_view psk) |
void | set_vec (std::string_view name, std::span< const uint8_t > psk) |
virtual | ~PSK_Database ()=default |
This is an interface to a generic PSK (pre-shared key) database. It might be implemented as a plaintext storage or via some mechanism that encrypts the keys and/or values.
|
virtualdefault |
|
pure virtual |
name
or otherwise throw an exception. Implemented in Botan::Encrypted_PSK_Database.
Referenced by get_str().
std::string Botan::PSK_Database::get_str | ( | std::string_view | name | ) | const |
Get a PSK in the form of a string (eg if the PSK is a password)
Definition at line 18 of file psk_db.cpp.
References Botan::cast_uint8_ptr_to_char(), and get().
|
pure virtual |
Implemented in Botan::Encrypted_PSK_Database.
|
pure virtual |
Implemented in Botan::Encrypted_PSK_Database.
|
pure virtual |
Remove the PSK with the given name
from the database
Implemented in Botan::Encrypted_PSK_Database.
|
pure virtual |
Set a value that can later be accessed with get(). If name already exists in the database, the old value will be overwritten.
Implemented in Botan::Encrypted_PSK_Database.
Referenced by set_str().
void Botan::PSK_Database::set_str | ( | std::string_view | name, |
std::string_view | psk ) |
Like set() but accepts the PSK as a string (eg for a password).
Definition at line 23 of file psk_db.cpp.
References Botan::cast_char_ptr_to_uint8(), and set().
|
inline |