function _encrypt_encryption_methods_openssl_hkdf in Encrypt 7.2
Generate a hash.
Parameters
string $hash_function: Hash function.
string $ikm: Initial keying material.
int $length: Length of the key in bytes.
string $salt: Salt.
Return value
string The generated key.
1 call to _encrypt_encryption_methods_openssl_hkdf()
- _encrypt_encryption_methods_openssl in plugins/
encryption_methods/ openssl.inc - Callback for Encrypt implementation: OpenSSL.
File
- plugins/
encryption_methods/ openssl.inc, line 143
Code
function _encrypt_encryption_methods_openssl_hkdf($hash_function, $ikm, $length, $salt) {
$key = hash_hmac($hash_function, $ikm, $salt, TRUE);
$key = substr($key, 0, $length);
return $key;
}