PKCS12_PBKDF< T > Class Template Reference

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

Inheritance diagram for PKCS12_PBKDF< T >:

## 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...

## Detailed Description

### template<class T>
class PKCS12_PBKDF< T >

PBKDF from PKCS #12, appendix B.

Template Parameters

  T | a HashTransformation class

Definition at line 175 of file pwdbased.h.

## Member Function Documentation

## MaxDerivedKeyLength()

template<class T>

size_t PKCS12_PBKDF< T >::MaxDerivedKeyLength | ( |  | ) | const

inline virtual

Provides the maximum derived key length.

Returns
  maximum derived key length, in bytes

Implements PasswordBasedKeyDerivationFunction.

Definition at line 178 of file pwdbased.h.

## UsesPurposeByte()

template<class T>

bool PKCS12_PBKDF< T >::UsesPurposeByte | ( |  | ) | const

inline virtual

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 179 of file pwdbased.h.

## DeriveKey()

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

  derived | the byte buffer to receive the derived password
  derivedLen | the size of the byte buffer to receive the derived password
  purpose | an octet indicating the purpose of the derivation
  password | the byte buffer with the password
  passwordLen | the size of the password, in bytes
  salt | the byte buffer with the salt
  saltLen | the size of the salt, in bytes
  iterations | the number of iterations to attempt
  timeInSeconds | the 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 184 of file pwdbased.h.

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

- pwdbased.h