Salted S2K key generation (OpenPGP document, RFC 2440)

 Methods

Generate the new key

calc(string $hash, string $password, string $salt, int $bytes) : string

Parameters

$hash

string

The hash algorithm to be used by HMAC

$password

string

The source password/key

$salt

string

The salt of the algorithm

$bytes

int

The output size in bytes

Exceptions

\Zend\Crypt\Key\Derivation\Exception\InvalidArgumentException

Returns

string

 Properties

 

$supportedMhashAlgos

$supportedMhashAlgos