QCA::HKDF Class Reference
QCA user API

`#include <QtCrypto>`

Collaboration diagram for QCA::HKDF:
[legend]

## Public Member Functions

| HKDF (const HKDF &from)
| HKDF (const QString &algorithm=QStringLiteral("sha256"), const QString &provider=QString())
SymmetricKey | makeKey (const SecureArray &secret, const InitializationVector &salt, const InitializationVector &info, unsigned int keyLength)
HKDF & | operator= (const HKDF &from)
Public Member Functions inherited from QCA::Algorithm
| Algorithm (const Algorithm &from)
void | change (const QString &type, const QString &provider)
void | change (Provider::Context *c)
Provider::Context * | context ()
const Provider::Context * | context () const
Algorithm & | operator= (const Algorithm &from)
Provider * | provider () const
Provider::Context * | takeContext ()
QString | type () const

## Additional Inherited Members

Protected Member Functions inherited from QCA::Algorithm
| Algorithm ()
| Algorithm (const QString &type, const QString &provider)

## Detailed Description

Since
  2.3

HMAC-based extract-and-expand key derivation function

This class implements HMAC-based Extract-and-Expand Key Derivation Function, as specified in RFC5869.

## Constructor & Destructor Documentation

## HKDF() [1/2]

QCA::HKDF::HKDF | ( | const QString & | algorithm = QStringLiteral("sha256"),
|  | const QString & | provider = QString() )

explicit

Standard constructor.

Parameters

  algorithm | the name of the hashing algorithm to use
  provider | the name of the provider to use, if available

References QCA::Algorithm::provider().

Referenced by HKDF(), and operator=().

## HKDF() [2/2]

QCA::HKDF::HKDF | ( | const HKDF & | from | ) |

Standard copy constructor.

Parameters

  from | the KeyDerivationFunction to copy from

References HKDF().

## Member Function Documentation

## operator=()

HKDF & QCA::HKDF::operator= | ( | const HKDF & | from | ) |

Assignment operator.

Copies the state (including key) from one HKDF to another

Parameters

  from | the HKDF to assign from

References HKDF().

## makeKey()

SymmetricKey QCA::HKDF::makeKey | ( | const SecureArray & | secret,
|  | const InitializationVector & | salt,
|  | const InitializationVector & | info,
|  | unsigned int | keyLength )

Generate the key from a specified secret, salt value, and an additional info.

Note
  key length is ignored for some functions

Parameters

  secret | the secret (password or passphrase)
  salt | the salt to use
  info | the info to use
  keyLength | the length of key to return

Returns
  the derived key

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

- qca_basic.h