string md5 function - generates 32 character hexadecimal number string
how-to-generate-hash-string-using-md5-function.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>string md5 function - generates 32 character hexadecimal number string</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Md Iqbal Hosan">
<meta name="title" content="string md5 function - generates 32 character hexadecimal number string">
<meta name="keywords" content="php, example, code, array, function, md5, string">
<meta name="description" content="string md5 function - generates 32 character hexadecimal number string">
<style>
h2, h4{background:#ddd; color:#000074;}
h2{ padding:3px; margin:3px; font-size:20px;}
h4{ padding:2px; margin:2px; font-size:18px;}
p{padding:2px; margin:2px; color:#0066CC;}
body{ background:#FFFFFc;}
</style>
</head>
<body>
<h2>string md5 function - generates 32 character hexadecimal number string</h2>
<pre>
<?php
/*
----------------------------------
let us make a simple name string
----------------------------------
*/
$myBossName = "SK Saiful Islam";
echo "<h4>Output of myBossName String</h4>";
print "<p>$"."myBossName = {$myBossName}</p>";
print "<p>string length : ".strlen($myBossName)."</p>";
/*
-----------------------------------------------------------------------------------
now i want to encript myBossName and get a hash value by using md5 string function
-----------------------------------------------------------------------------------
*/
$hashedMyBossName = md5($myBossName);
echo "<h4>Output of hashedMyBossName by using string md5 function</h4>";
print "<p>$"."hashedMyBossName = {$hashedMyBossName}</p>";
print "<p>string length : ".strlen($hashedMyBossName)."</p>";
/*
---------------------------------------------------------------------------------------
this function rapidly used in professional programming to store
visitor's password, credit card numbers etc.
---------------------------------------------------------------------------------------
*/
?>
</pre>
</body>
</html>

No comments:
Post a Comment
leave your comments here..