Tuesday, April 12, 2011

MD5 encryption

I have seen lots of people who are new to this information security field dnt know how to encrypt the text in md5 , here in my post i will tell you how to encrypt your desired text into md5 ..

First of all lets know about the MD5  

MD5 stands for message digest algorithm , which is used widely with 128 bit hash value and MD5 is specifically displayed in 32 bit hexadecimal number .

How to Encrypt the text  in to MD5 ?? 

For encrypting the text you need to create a html file with one text box and one submit button .. Below is the code for html file



<html>
<head><title>MD5 Hash encrypter </title></head>
<body  >
<center>
<form action="md5.php" method="get">
<h1>MD5 Hash Encrypter</h1>
<h3>ENTER THE ASCII VALUES</h3><br/><br/>
<input type="text" name="inputtxt"/><br/><br/>
<input type="submit" name="submit" value="submit"/>
</form></center>
</body>
</html>



Now you need to save it anyname of your choice but the extensions should be .html or .htm

After creation of the html file now u need to create a php  and below is the code for that php file

?php
$input =$_GET['inputtxt'];
if($input=="")
{
echo "Input cant be null";
exit();

}
echo "Md5 of ".$input." is ".md5($input)."<br/> <br/>";
?>

Now save it as md5.php but how to execute it ??? 

For executing these files you need to have a webserver in your computer , there are so many webserver available for free in the market like apache tomcat server , wamp , xampp etc .  My  recommendation will be wamp server .
Now download the wamp server and install it in the your box and u can see a wamp directory created in your operating system drive . Goto %windir%/wamp/www/ and copy the html and php file in that directory .
Now start your server and open your webbrowser and type http://localhost/hash.html ( hash.html is the file name which i have discussed earlier ) 

Is decryption possible ????

Well you can't decrypt it directly. Md5 it's one way hash function. But there are some limited choices, like a huge database with md5 decrypted strings. You can try this Md5 decrypter tool.


In the same way you can encrypt in to different different hash like md2 ,md4 , sha1 , sha256 , sha384 , sha512  . below is the code for all those encryptions

<?php
$input =$_GET['inputtxt'];
if($input=="")
{
echo "Input cant be null";
exit();

}
echo "md2 of ".$input." is ".hash("md2",$input)."<br/> <br/>";
echo "Md5 of ".$input." is ".md5($input)."<br/> <br/>";
echo "sha1 of ".$input." is ".sha1($input)."<br/> <br/>";
echo "sha256 of ".$input." is ".hash("sha256",$input)."<br/> <br/>";
echo "sha384 of ".$input." is ".hash("sha384",$input)."<br/> <br/>";
echo "sha512 of ".$input." is ".hash("sha512",$input)."<br/> <br/>";

?>

If you like my post please comment  !!














0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Vamshi krishnam raju | Bloggerized by Vamshi krishnam raju - Vamshi krishnam raju | Vamshi krishnam raju