mhash_keygen_s2k

string mhash_keygen_s2k(const hash, string password, string salt, int bytes) 
hash mhash constant representing a specific hash algorithm
password User password
salt Random data
bytes Key length

Generates a salted key based on the specified hash algorithm.

Returns:

Salted key value as a string; FALSE on error

Description:

mhash_keygen_s2k() generates a key of bytes length from a user-given password , using the hash hash . This produces the “Salted S2K” data element described in RFC 2440. This function can be used to compute checksums, message digests, and other signatures.

The salt is a random piece of data used to generate the key. To check the key, you must also know the salt , so it’s a good idea to append the salt to ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.