SQL PHP HTML ASP JavaScript articles and free scripts to download
PHP String Functions

Md5 hash: Encryption of a string

md5 returns the hash of a string. This is used to encrypt strings and particularly encrypting the passwords of the user. This function returns the encrypted string by using RSA Data Security Inc.

Let us try to learn how to use this function.

$str="Hello";
echo md5($str);

The output of the above code will be

8b1a9953c4611296a827abf8c47804d7

The length of the password after encryption is 32 char.
If you are using database table to store password then the password field should be minimum 32 char length. Read sql_update command to know more about storing encrypted password in table.

md5 encryption is useful to store passwords and other sensitive data. md5 encryption is one way only, there is no standard method to generate the source or the original string from the hash of the string. So passwords can't be retrieved and it can only be reset.

Here is a script to display the md5 output for a given string.

Maximum 8 char length allowed
Use only alphanumeric characters

Be the first to post comment on this article :


Google+
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer