Salted S2K key generation (OpenPGP document, RFC 2440)
More...
|
static static | calc ($hash, $password, $salt, $bytes) |
| Generate the new key.
|
|
Salted S2K key generation (OpenPGP document, RFC 2440)
static static calc |
( |
|
$hash, |
|
|
|
$password, |
|
|
|
$salt, |
|
|
|
$bytes |
|
) |
| |
|
static |
Generate the new key.
- Parameters
-
string | $hash | The hash algorithm to be used by HMAC |
string | $password | The source password/key |
int | $bytes | The output size in bytes |
string | $salt | The salt of the algorithm |
- Exceptions
-
Exception\InvalidArgumentException | |
- Returns
- string
Initial value:= [
'adler32' => MHASH_ADLER32