crypt()
crypt - One-way string hashing
Syntax
string crypt (
string $str,
string $salt)
Arguments
- str - The string to be hashed.
- salt - An optional salt string to base the hashing on. If not provided, one will be randomly generated by PHP each time you call this function. If you are using the supplied salt, you should be aware that the salt is generated once. If you are calling this function repeatedly, this may impact both appearance and security.
Description
crypt() will return a hashed string using the standard Unix DES-based algorithm or alternative algorithms that may be available on the system.
Version
PHP 4, 5
Return value
Returns the hashed string or a string that is shorter than 13 characters and is guaranteed to differ from the salt on failure.