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

PBKDF from PKCS #12, appendix B. More...

#include <pwdbased.h>

Inheritance diagram for PKCS12_PBKDF< T >:
[legend]
Collaboration diagram for PKCS12_PBKDF< 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) const
 Derive key from the password. More...
 
- Public Member Functions inherited from PasswordBasedKeyDerivationFunction
virtual ~PasswordBasedKeyDerivationFunction ()
 

Detailed Description

template<class T>
class PKCS12_PBKDF< T >

PBKDF from PKCS #12, appendix B.

Template Parameters
Ta HashTransformation class

Definition at line 173 of file pwdbased.h.

Member Function Documentation

template<class T >
unsigned int PKCS12_PBKDF< 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 
) 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 182 of file pwdbased.h.

Here is the call graph for this function:

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

Provides the maximum derived key length.

Returns
maximum derived key length, in bytes

Implements PasswordBasedKeyDerivationFunction.

Definition at line 176 of file pwdbased.h.

template<class T>
bool PKCS12_PBKDF< 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 177 of file pwdbased.h.

Here is the call graph for this function:


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