11#include <botan/symkey.h>
42 static std::unique_ptr<PBKDF>
create(std::string_view algo_spec, std::string_view provider =
"");
50 static std::unique_ptr<PBKDF>
create_or_throw(std::string_view algo_spec, std::string_view provider =
"");
55 static std::vector<std::string>
providers(std::string_view algo_spec);
70 virtual std::string
name()
const = 0;
89 virtual size_t pbkdf(uint8_t out[],
91 std::string_view passphrase,
95 std::chrono::milliseconds msec)
const = 0;
109 std::string_view passphrase,
110 const uint8_t salt[],
112 size_t iterations)
const;
128 std::string_view passphrase,
129 const uint8_t salt[],
131 std::chrono::milliseconds msec,
132 size_t& iterations)
const;
145 size_t out_len, std::string_view passphrase,
const uint8_t salt[],
size_t salt_len,
size_t iterations)
const;
160 std::string_view passphrase,
161 const uint8_t salt[],
163 std::chrono::milliseconds msec,
164 size_t& iterations)
const;
177 size_t out_len, std::string_view passphrase,
const uint8_t salt[],
size_t salt_len,
size_t iterations)
const {
188 template <
typename Alloc>
190 std::string_view passphrase,
191 const std::vector<uint8_t, Alloc>& salt,
192 size_t iterations)
const {
206 std::string_view passphrase,
207 const uint8_t salt[],
209 std::chrono::milliseconds msec,
210 size_t& iterations)
const {
222 template <
typename Alloc>
224 std::string_view passphrase,
225 const std::vector<uint8_t, Alloc>& salt,
226 std::chrono::milliseconds msec,
227 size_t& iterations)
const {
244inline
PBKDF*
get_pbkdf(std::string_view algo_spec, std::string_view provider =
"") {
244inline
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