hkdf($key[, $digest = 'sha512'[, $salt = NULL[, $length = NULL[, $info = '']]]])
| Parameters: |
|
|---|---|
| Returns: |
A pseudo-random key or FALSE on failure |
| Return type: |
string |
Derives a key from another, presumably weaker key.
This method is used internally to derive an encryption and HMAC key from your configured encryption_key.
It is publicly available due to its otherwise general purpose. It is described in RFC 5869.
However, as opposed to the description in RFC 5869, this implementation doesn’t support SHA1.
Example:
$hmac_key = $this->encryption->hkdf(
$key,
'sha512',
NULL,
NULL,
'authentication'
);
// $hmac_key is a pseudo-random key with a length of 64 bytes
Please login to continue.