Botan 2.19.1
Crypto and TLS for C&
|
#include <scrypt.h>
Public Member Functions | |
void | derive_key (uint8_t out[], size_t out_len, const char *password, size_t password_len, const uint8_t salt[], size_t salt_len) const override |
size_t | iterations () const override |
size_t | memory_param () const override |
size_t | N () const |
Scrypt & | operator= (const Scrypt &)=default |
size_t | p () const |
size_t | parallelism () const override |
size_t | r () const |
Scrypt (const Scrypt &other)=default | |
Scrypt (size_t N, size_t r, size_t p) | |
std::string | to_string () const override |
size_t | total_memory_usage () const override |
Botan::Scrypt::Scrypt | ( | size_t | N, |
size_t | r, | ||
size_t | p | ||
) |
Definition at line 127 of file scrypt.cpp.
|
default |
|
overridevirtual |
Derive a new key under the current Scrypt parameter set
Implements Botan::PasswordHash.
Definition at line 153 of file scrypt.cpp.
References N(), p(), r(), salt_len, and Botan::scrypt().
|
inlineoverridevirtual |
Most password hashes have some notion of iterations.
Implements Botan::PasswordHash.
Definition at line 41 of file scrypt.h.
|
inlineoverridevirtual |
Some password hashing algorithms have a parameter which controls how much memory is used. If not supported by some algorithm, returns 0.
Reimplemented from Botan::PasswordHash.
Definition at line 45 of file scrypt.h.
|
inline |
|
inline |
|
inlineoverridevirtual |
Some password hashing algorithms have a parallelism parameter. If the algorithm does not support this notion, then the function returns zero. This allows distinguishing between a password hash which just does not support parallel operation, vs one that does support parallel operation but which has been configured to use a single lane.
Reimplemented from Botan::PasswordHash.
Definition at line 43 of file scrypt.h.
|
inline |
|
overridevirtual |
Implements Botan::PasswordHash.
Definition at line 141 of file scrypt.cpp.
|
overridevirtual |
Returns an estimate of the total memory usage required to perform this key derivation.
If this algorithm uses a small and constant amount of memory, with no effort made towards being memory hard, this function returns 0.
Reimplemented from Botan::PasswordHash.
Definition at line 148 of file scrypt.cpp.
References Botan::scrypt_memory_usage().