Home > Article > Backend Development > In PHP, what does hash function mean?
#A hash function is any function that can be used to map data of any size to data of a fixed size. The value returned by a hash function is called a hash value, hash code, digest, or simply hash.
string hash( string $algo , string $data [, bool $raw_output = FALSE ] )
The name of the selected hash algorithm (such as "md5", "sha256", "haval160,4" etc.)
The message to be hashed.
When set to TRUE, raw binary data is output. FALSE outputs lowercase hexadecimal.
<?php echo hash('sha256', 'Weelcome Tutorials Point'); ?>
dacbedc476c664e457b165580dd5eb491bc027c914504066c51f56b1116d56e0
The above is the detailed content of In PHP, what does hash function mean?. For more information, please follow other related articles on the PHP Chinese website!