11#include <botan/symkey.h>
44 static std::unique_ptr<PBKDF>
create(std::string_view algo_spec, std::string_view provider =
"");
52 static std::unique_ptr<PBKDF>
create_or_throw(std::string_view algo_spec, std::string_view provider =
"");
58 static std::vector<std::string>
providers(std::string_view algo_spec);
75 virtual std::string
name()
const = 0;
94 virtual size_t pbkdf(uint8_t out[],
96 std::string_view passphrase,
100 std::chrono::milliseconds msec)
const = 0;
114 std::string_view passphrase,
115 const uint8_t salt[],
117 size_t iterations)
const;
133 std::string_view passphrase,
134 const uint8_t salt[],
136 std::chrono::milliseconds msec,
137 size_t& iterations)
const;
150 size_t out_len, std::string_view passphrase,
const uint8_t salt[],
size_t salt_len,
size_t iterations)
const;
165 std::string_view passphrase,
166 const uint8_t salt[],
168 std::chrono::milliseconds msec,
169 size_t& iterations)
const;
182 size_t out_len, std::string_view passphrase,
const uint8_t salt[],
size_t salt_len,
size_t iterations)
const {
193 template <
typename Alloc>
195 std::string_view passphrase,
196 const std::vector<uint8_t, Alloc>& salt,
197 size_t iterations)
const {
211 std::string_view passphrase,
212 const uint8_t salt[],
214 std::chrono::milliseconds msec,
215 size_t& iterations)
const {
227 template <
typename Alloc>
229 std::string_view passphrase,
230 const std::vector<uint8_t, Alloc>& salt,
231 std::chrono::milliseconds msec,
232 size_t& iterations)
const {
249inline
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