Jump to content

md5 forms


Madatan

Recommended Posts

Okey so I got a login form thats sending the password to a database, I want the password to be converted into md5. How do I do that? and then, how do I do in the login area so it read it as md5?

[code]


form id="form1" name="form1" method="post" action="">
    <input type="text" name="anv" />
  </p>
<p>Email:
<input name="email" type="text" id="email" />
</p>
<p>L&ouml;senord:
<input name="losen" type="password" id="losen" />
<input name="ranger" type="submit" id="ranger" value="Register" />
</p>
</form>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/18287-md5-forms/
Share on other sites

to use md5 encryption you simply need to use teh md5(); function.

I have seen many scripts that process the data posted from a form and do md5 on recipet of the info - which for me completely defeats the object. Sure the string shoudl be encrypted client side (if js is on!) prior to being sent over the network......
Link to comment
https://forums.phpfreaks.com/topic/18287-md5-forms/#findComment-78534
Share on other sites


//Translate from md5

Well you dont need to.

In your database you store the encrytped password, then upon checking you take the users entered password, md5 it and check the md5 against the md5 that you stored in your database...Matched? Great then proceed.

$users_password=$_POST['password'];
$md5thepassword=md5($users_password);

blah blah select blah where blah = $md5thepassword

Kinda thing

Make sense?

Will

Link to comment
https://forums.phpfreaks.com/topic/18287-md5-forms/#findComment-78536
Share on other sites

MD5() is a 32 Bit One Way encryption
32Bit?
What ever the value
$a = "";
$a = "this is a long sentance, but I cant think of anything to type";

with using md5(), the value is 32 chars long (32 bits)

One Way Encryption

Means, you can not get a MD5 Encrypted string, and translate it back to what it was.

Although rumours have spread that hackers can. But think to yourself, Is your information Soo Important that a hack wants to hack the enctryption.
Link to comment
https://forums.phpfreaks.com/topic/18287-md5-forms/#findComment-78540
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.