Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | List of all members
PKCS5_PBKDF2_HMAC< T > Class Template Reference

PBKDF2 from PKCS #5. More...

#include <pwdbased.h>

Inheritance diagram for PKCS5_PBKDF2_HMAC< T >:
[legend]
Collaboration diagram for PKCS5_PBKDF2_HMAC< T >:
[legend]

Public Member Functions

size_t MaxDerivedKeyLength () const
 Provides the maximum derived key length. More...
 
bool UsesPurposeByte () const
 Determines if the derivation function uses the purpose byte. More...
 
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
 Derive key from the password. More...
 
- Public Member Functions inherited from PasswordBasedKeyDerivationFunction
virtual ~PasswordBasedKeyDerivationFunction ()
 

Detailed Description

template<class T>
class PKCS5_PBKDF2_HMAC< T >

PBKDF2 from PKCS #5.

Template Parameters
Ta HashTransformation class

Definition at line 62 of file pwdbased.h.

Member Function Documentation

template<class T >
unsigned int PKCS5_PBKDF2_HMAC< T >::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
virtual

Derive key from the password.

Parameters
derivedthe byte buffer to receive the derived password
derivedLenthe size of the byte buffer to receive the derived password
purposean octet indicating the purpose of the derivation
passwordthe byte buffer with the password
passwordLenthe size of the password, in bytes
saltthe byte buffer with the salt
saltLenthe size of the salt, in bytes
iterationsthe number of iterations to attempt
timeInSecondsthe length of time the derivation function should execute
Returns
iteration count achieved

DeriveKey returns the actual iteration count achieved. If timeInSeconds == 0, then the complete number of iterations will be obtained. If timeInSeconds != 0, then DeriveKey will iterate until time elapsed, as measured by ThreadUserTimer.

Implements PasswordBasedKeyDerivationFunction.

Definition at line 111 of file pwdbased.h.

Here is the call graph for this function:

template<class T>
size_t PKCS5_PBKDF2_HMAC< T >::MaxDerivedKeyLength ( ) const
inlinevirtual

Provides the maximum derived key length.

Returns
maximum derived key length, in bytes

Implements PasswordBasedKeyDerivationFunction.

Definition at line 65 of file pwdbased.h.

template<class T>
bool PKCS5_PBKDF2_HMAC< T >::UsesPurposeByte ( ) const
inlinevirtual

Determines if the derivation function uses the purpose byte.

Returns
true if the derivation function uses the purpose byte, false otherwise

Implements PasswordBasedKeyDerivationFunction.

Definition at line 66 of file pwdbased.h.

Here is the call graph for this function:


The documentation for this class was generated from the following file: