Interface for key derivation functions.
More...
Interface for key derivation functions.
- Since
- Crypto++ 7.0
- See also
- KeyDerivationFunction on the Crypto++ wiki
Definition at line 1505 of file cryptlib.h.
◆ AlgorithmName()
virtual std::string KeyDerivationFunction::AlgorithmName |
( |
| ) |
const |
|
pure virtual |
◆ MinDerivedKeyLength()
virtual size_t KeyDerivationFunction::MinDerivedKeyLength |
( |
| ) |
const |
|
virtual |
Determine minimum number of bytes.
- Returns
- Minimum number of bytes which can be derived
◆ MaxDerivedKeyLength()
virtual size_t KeyDerivationFunction::MaxDerivedKeyLength |
( |
| ) |
const |
|
virtual |
◆ GetValidDerivedLength()
virtual size_t KeyDerivationFunction::GetValidDerivedLength |
( |
size_t |
keylength | ) |
const |
|
pure virtual |
◆ IsValidDerivedLength()
virtual bool KeyDerivationFunction::IsValidDerivedLength |
( |
size_t |
keylength | ) |
const |
|
inlinevirtual |
Returns whether keylength is a valid key length.
- Parameters
-
keylength | the requested keylength |
- Returns
- true if the derived keylength is valid, false otherwise Internally the function calls GetValidKeyLength()
Definition at line 1531 of file cryptlib.h.
◆ DeriveKey()
Derive a key from a seed.
- Parameters
-
derived | the derived output buffer |
derivedLen | the size of the derived buffer, in bytes |
secret | the seed input buffer |
secretLen | the size of the secret buffer, in bytes |
params | additional initialization parameters to configure this object |
- Returns
- the number of iterations performed
- Exceptions
-
InvalidDerivedKeyLength | if derivedLen is invalid for the scheme DeriveKey() provides a standard interface to derive a key from a secret seed and other parameters. Each class that derives from KeyDerivationFunction provides an overload that accepts most parameters used by the derivation function. the number of iterations performed by DeriveKey() may be 1. For example, a scheme like HKDF does not use the iteration count so it returns 1. |
Implemented in PKCS12_PBKDF< T >, PKCS5_PBKDF2_HMAC< T >, PKCS5_PBKDF1< T >, Scrypt, and HKDF< T >.
◆ SetParameters()
virtual void KeyDerivationFunction::SetParameters |
( |
const NameValuePairs & |
params | ) |
|
|
virtual |
Set or change parameters.
- Parameters
-
params | additional initialization parameters to configure this object SetParameters() is useful for setting common parameters when an object is reused. Some derivation function classes may choose to implement it. |
The documentation for this class was generated from the following file: