The crypt() function returns a hashed string using DES, Blowfish, SHA256, SHA512, or MD5 algorithms
the crypt() function supports multiple hash types : CRYPT_STD_DES, CRYPT_EXT_DES, CRYPT_MD5, CRYPT_BLOWFISH, CRYPT_SHA256, CRYPT_SHA512
crypt ( string $string , string $salt) : string
Parameter Name | Descrption |
---|---|
$string | Required, The string. |
$salt | Optional, salt string to base the hashing on. |
Returns the hashed string
$password = 'aSASas'; echo crypt($password); //Output :: $1$bg..I53.$hJmp8U7B4Vq5ysHLb1eZS/
Related Functions