Liam Delahunty: Home Tips Web Contact
Recommended laptop
under £500
.

Think I deserve a present? See my Amazon Wish List

MD5 Hash A String

MD5 is a one way encryption or hash of the input, and is commonly used to check the integrity of files.

With the almost never ending amounts of passwords and user IDs required to use websites, it's extremely dangerous ot use one password for all sites so it can be useful to use a phrase for a web site and then get the hash to be used as the password. Eg, "myname amazon.co.uk" becomes "c64cee32" so one could use that as a password that's too hard to guess but easy for one to lookup again.

Enter the text
MD5
First 8
 

 

if ($_POST['submit']){
    $mymd5=md5($_POST['mystring']);
    $mymd5_8=substr("$mymd5",0,8);
}

md5
md5 is a one way hash of a string, taking an input of any length and producing a 128-bit "fingerprint" or "message digest" of the input.
See The MD5 Message-Digest Algorithm
md5sum
md5sum is a computer program that calculates and verifies 128-bit MD5 hashes

Share this!