<?php // 087 - Md5 - ( message digest algoritham ) & Sha1 ( us secure hash algoritham - 1 ) echo "</br><span class='myheading'>087 - Md5 - ( message digest algoritham ) & Sha1 ( us secure hash algoritham - 1 ) </span></br>"; $str = "Hello"; echo "The string: ".$str."<br>"; echo "md5 Binary : ".md5($str, TRUE)."<br>"; //convert to -- 16 char ( if true then = binary ) echo "md5 HEX : ".md5($str)."<br>"; //-- 32 char ( if false or no value = hex ) echo "sha1 Binary : ".sha1($str, TRUE)."<br>"; //-- 20 char binary echo "sha1 hex : ".sha1($str)."<br>"; //-- 40 char binary echo '</pre>'; if (md5($str) == "8b1a9953c4611296a827abf8c47804d7") // practical approch { echo "<br>password ok"; exit; } ?>

087 - Md5 - ( message digest algoritham ) & Sha1 ( us secure hash algoritham - 1 )
The string: Hello
md5 Binary : ‹™SÄa–¨'«øÄx×
md5 HEX : 8b1a9953c4611296a827abf8c47804d7
sha1 Binary : ÷ÿž‹{²à›p“Z]x^ ÅÙЫð
sha1 hex : f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0

password ok