Categories:
Cloud (161)
Entertainment (11)
Facebook (43)
General (16)
Life (30)
Programming (33)
Technology (224)
Testing (4)
Tools (431)
Twitter (5)
Wearable (26)
Web Design (9)
Collections:
Other Resources:
MD5 Hash Function in PHP
How to calculate the MD5 hash of a string in PHP?
✍: FYIcenter.com
You can use the following md5() function to calculate the MD5 hash of a string using the MD5 Message-Digest Algorithm.
string md5 ( string $str [, bool $raw_output = false ] )
str - The input string.
raw_output - If TRUE, then the md5 digest is instead returned in raw binary format with a length of 16.
(return) - The hash value as a 32-character hexadecimal number, or as binary string of 16 bytes, if $raw_output=true.
For example,
$str = 'apple'; if (md5($str) === '1f3870be274f6c49b3e31a0c6728957f') { echo "Would you like a green or red apple?"; }
2015-11-23, 1899👍, 2💬
Popular Posts:
How to create a new WeChat account with my Facebook account? Creating a new WeChat account with a Fa...
Why I am getting the "run or save ChromeSetup.exe" pop up box when trying to install Google Chrome 3...
How to add a picture to a PowerPoint slide? I have a very nice picture I took from a meeting. Can I ...
Sometimes I see special symbols are showing up at the end of each paragraph in my Microsoft Word doc...
Where does Mozilla Firefox 2 store download files? When you download files from Websites, Mozilla Fi...