11#include <botan/symkey.h>
41 static std::unique_ptr<PBKDF>
create(std::string_view algo_spec, std::string_view provider =
"");
49 static std::unique_ptr<PBKDF>
create_or_throw(std::string_view algo_spec, std::string_view provider =
"");
54 static std::vector<std::string>
providers(std::string_view algo_spec);
69 virtual std::string
name()
const = 0;
88 virtual size_t pbkdf(uint8_t out[],
90 std::string_view passphrase,
94 std::chrono::milliseconds msec)
const = 0;
108 std::string_view passphrase,
109 const uint8_t salt[],
111 size_t iterations)
const;
127 std::string_view passphrase,
128 const uint8_t salt[],
130 std::chrono::milliseconds msec,
131 size_t& iterations)
const;
144 size_t out_len, std::string_view passphrase,
const uint8_t salt[],
size_t salt_len,
size_t iterations)
const;
159 std::string_view passphrase,
160 const uint8_t salt[],
162 std::chrono::milliseconds msec,
163 size_t& iterations)
const;
176 size_t out_len, std::string_view passphrase,
const uint8_t salt[],
size_t salt_len,
size_t iterations)
const {
187 template <
typename Alloc>
189 std::string_view passphrase,
190 const std::vector<uint8_t, Alloc>& salt,
191 size_t iterations)
const {
205 std::string_view passphrase,
206 const uint8_t salt[],
208 std::chrono::milliseconds msec,
209 size_t& iterations)
const {
221 template <
typename Alloc>
223 std::string_view passphrase,
224 const std::vector<uint8_t, Alloc>& salt,
225 std::chrono::milliseconds msec,
226 size_t& iterations)
const {
243inline
PBKDF*
get_pbkdf(std::string_view algo_spec, std::string_view provider =
"") {
#define BOTAN_DEPRECATED_HEADER(hdr)
#define BOTAN_PUBLIC_API(maj, min)
#define BOTAN_DEPRECATED(msg)
static std::vector< std::string > providers(std::string_view algo_spec)
OctetString derive_key(size_t out_len, std::string_view passphrase, const std::vector< uint8_t, Alloc > &salt, size_t iterations) const
OctetString derive_key(size_t out_len, std::string_view passphrase, const uint8_t salt[], size_t salt_len, size_t iterations) const
virtual std::unique_ptr< PBKDF > new_object() const =0
static std::unique_ptr< PBKDF > create_or_throw(std::string_view algo_spec, std::string_view provider="")
virtual size_t pbkdf(uint8_t out[], size_t out_len, std::string_view passphrase, const uint8_t salt[], size_t salt_len, size_t iterations, std::chrono::milliseconds msec) const =0
void pbkdf_iterations(uint8_t out[], size_t out_len, std::string_view passphrase, const uint8_t salt[], size_t salt_len, size_t iterations) const
void pbkdf_timed(uint8_t out[], size_t out_len, std::string_view passphrase, const uint8_t salt[], size_t salt_len, std::chrono::milliseconds msec, size_t &iterations) const
virtual std::string name() const =0
static std::unique_ptr< PBKDF > create(std::string_view algo_spec, std::string_view provider="")
OctetString derive_key(size_t out_len, std::string_view passphrase, const uint8_t salt[], size_t salt_len, std::chrono::milliseconds msec, size_t &iterations) const
OctetString derive_key(size_t out_len, std::string_view passphrase, const std::vector< uint8_t, Alloc > &salt, std::chrono::milliseconds msec, size_t &iterations) const
PBKDF * get_pbkdf(std::string_view algo_spec, std::string_view provider="")
PBKDF * get_s2k(std::string_view algo_spec)
std::vector< T, secure_allocator< T > > secure_vector