Qt Cryptographic Architecture
|
#include <QtCrypto>
Public Member Functions | |
KeyDerivationFunction (const KeyDerivationFunction &from) | |
SymmetricKey | makeKey (const SecureArray &secret, const InitializationVector &salt, unsigned int keyLength, unsigned int iterationCount) |
SymmetricKey | makeKey (const SecureArray &secret, const InitializationVector &salt, unsigned int keyLength, int msecInterval, unsigned int *iterationCount) |
KeyDerivationFunction & | operator= (const KeyDerivationFunction &from) |
![]() | |
Algorithm (const Algorithm &from) | |
void | change (Provider::Context *c) |
void | change (const QString &type, const QString &provider) |
Provider::Context * | context () |
const Provider::Context * | context () const |
Algorithm & | operator= (const Algorithm &from) |
Provider * | provider () const |
Provider::Context * | takeContext () |
QString | type () const |
Static Public Member Functions | |
static QString | withAlgorithm (const QString &kdfType, const QString &algType) |
Protected Member Functions | |
KeyDerivationFunction (const QString &type, const QString &provider) | |
![]() | |
Algorithm () | |
Algorithm (const QString &type, const QString &provider) | |
General superclass for key derivation algorithms.
KeyDerivationFunction is a superclass for the various key derivation function algorithms within QCA. You should not need to use it directly unless you are adding another key derivation capability to QCA - you should be using a sub-class. PBKDF2 using SHA1 is recommended for new applications.
QCA::KeyDerivationFunction::KeyDerivationFunction | ( | const KeyDerivationFunction & | from | ) |
Standard copy constructor.
from | the KeyDerivationFunction to copy from |
|
protected |
Special constructor for subclass initialisation.
type | the algorithm to create |
provider | the name of the provider to create the key derivation function in. |
KeyDerivationFunction& QCA::KeyDerivationFunction::operator= | ( | const KeyDerivationFunction & | from | ) |
Assignment operator.
Copies the state (including key) from one KeyDerivationFunction to another
from | the KeyDerivationFunction to assign from |
SymmetricKey QCA::KeyDerivationFunction::makeKey | ( | const SecureArray & | secret, |
const InitializationVector & | salt, | ||
unsigned int | keyLength, | ||
unsigned int | iterationCount | ||
) |
Generate the key from a specified secret and salt value.
secret | the secret (password or passphrase) |
salt | the salt to use |
keyLength | the length of key to return |
iterationCount | the number of iterations to perform |
SymmetricKey QCA::KeyDerivationFunction::makeKey | ( | const SecureArray & | secret, |
const InitializationVector & | salt, | ||
unsigned int | keyLength, | ||
int | msecInterval, | ||
unsigned int * | iterationCount | ||
) |
Generate the key from a specified secret and salt value.
secret | the secret (password or passphrase) |
salt | the salt to use |
keyLength | the length of key to return |
msecInterval | the maximum time to compute the key, in milliseconds |
iterationCount | a pointer to store the number of iteration done for the specified time |
|
static |
Construct the name of the algorithm.
You can use this to build a standard name string. You probably only need this method if you are creating a new subclass.
kdfType | the type of key derivation function |
algType | the name of the algorithm to use with the key derivation function |