Home > Backend Development > PHP Tutorial > In PHP, what does hash function mean?

In PHP, what does hash function mean?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-09-03 08:50:01
forward
1087 people have browsed it

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.

Syntax

string hash( string $algo , string $data [, bool $raw_output = FALSE ] )
Copy after login

Parameters

algo

The name of the selected hash algorithm (such as "md5", "sha256", "haval160,4" etc.)

data

The message to be hashed.

raw_output

When set to TRUE, raw binary data is output. FALSE outputs lowercase hexadecimal.

Example

<?php
   echo hash(&#39;sha256&#39;, &#39;Weelcome Tutorials Point&#39;);
?>
Copy after login

Output

dacbedc476c664e457b165580dd5eb491bc027c914504066c51f56b1116d56e0
Copy after login

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!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template