Qt Cryptographic Architecture
QCA::HKDF Class Reference

#include <QtCrypto>

Collaboration diagram for QCA::HKDF:

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)
 
HKDFoperator= (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::Contextcontext ()
 
const Provider::Contextcontext () const
 
Algorithmoperator= (const Algorithm &from)
 
Providerprovider () const
 
Provider::ContexttakeContext ()
 
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
algorithmthe name of the hashing algorithm to use
providerthe name of the provider to use, if available

◆ HKDF() [2/2]

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

Standard copy constructor.

Parameters
fromthe KeyDerivationFunction to copy from

Member Function Documentation

◆ operator=()

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

Assignment operator.

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

Parameters
fromthe HKDF to assign from

◆ 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
secretthe secret (password or passphrase)
saltthe salt to use
infothe info to use
keyLengththe length of key to return
Returns
the derived key

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