How to use md5 in PHP
In this article I will explain how the explode() function can be used in PHP.
md5() function in PHP
- The md5() function is used to calculates the MD5 hash of a string.
- The md5() function uses the RSA Data Security.
- The md5() algorithm is intended for digital signature applications.
- The md5() function returns the calculated MD5 hash on success, or FALSE on failure.
Syntax
Parameter
- string string is required parameter. It determine check to string.
-
raw raw is optional parameter. determine hex or binary output format:
- TRUE - Raw 16 character binary format.
- FALSE - it's the default value. 32 character hex number.
Example
The following example show to how the md5() function can be used in PHP.
<html>
<body>
<h3 style="color: red;">md5() function example in PHP</h3>
<?php
$str = "Csharpcorner";
echo 'csharpcorner md5 code : <br/>'.md5($str);
if (md5($str) == '7bb86eead48eb67a958903adb7e1e706')
{
echo "<br />Welcome to C-sharpcorner..!";
exit;
}
?>
</body>
</html>
|
Output
You may also want to read these related articles here
Ask Your Question
Got a programming related question? You may want to post your question here