abstract base class for password based key derivation function More...
#include <pwdbased.h>
Public Member Functions | |
virtual size_t | MaxDerivedKeyLength () const =0 |
virtual bool | UsesPurposeByte () const =0 |
virtual unsigned int | DeriveKey (byte *derived, size_t derivedLen, byte purpose, const byte *password, size_t passwordLen, const byte *salt, size_t saltLen, unsigned int iterations, double timeInSeconds=0) const =0 |
derive key from password |
abstract base class for password based key derivation function
Definition at line 14 of file pwdbased.h.
virtual unsigned int PasswordBasedKeyDerivationFunction::DeriveKey | ( | byte * | derived, | |
size_t | derivedLen, | |||
byte | purpose, | |||
const byte * | password, | |||
size_t | passwordLen, | |||
const byte * | salt, | |||
size_t | saltLen, | |||
unsigned int | iterations, | |||
double | timeInSeconds = 0 | |||
) | const [pure virtual] |
derive key from password
If timeInSeconds != 0, will iterate until time elapsed, as measured by ThreadUserTimer Returns actual iteration count, which is equal to iterations if timeInSeconds == 0, and not less than iterations otherwise.
Implemented in PKCS5_PBKDF1< T >, PKCS5_PBKDF2_HMAC< T >, and PKCS12_PBKDF< T >.