Detailed explanation of the difference between php md5 and md5_file_PHP tutorial

WBOY
Release: 2016-07-13 10:54:09
Original
1269 people have browsed it

md5($str) Hash encryption for string

Examples
*/
$str="hello world"; //Define string
$result=md5($str); //Perform encryption operation
echo $result; //Output the converted result

//md5_file( $filepath) Hash-encrypts the file content

$file="test.txt"; //Definition file
$result=md5_file($file); //Perform calculation operation
echo $result; //Output the calculated result

/*

The md5_file() function calculates the md5 hash of a file.

The md5() function uses rsa data security, including the md5 message digest algorithm.

Returns the calculated md5 hash if successful, false if failed.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632347.htmlTechArticlemd5($str) Hash encryption example for string*/ $str=hello world;//Definition String $result=md5($str);//Perform encryption operation echo $result;//Output the converted result//md5_file( $fi...
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!