Click here to Skip to main content
15,032,967 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi EveryOne,

I have a page for registration like it accepts username,password ,email etc , on blur() event of password , it is generating hash code and replacing the password textbox value. and then storing in database. After successful registration of the user. Now user logs in with username and password, again while logging in on blur() event again new hash code will be generated for the same password. Now to decrypt it in the server side.
I 've tried but passwords are not matching, The code gave by my seniors for them it is working but for me it's not working .
Or do you have any other code samples ....

My problem is something like this:
Client Side Hashing using JQuery[^]

But now i need the same password on server side...
Posted
Updated 16-Jul-13 18:47pm
v2

1 solution

First of all,theres no need to make this at client side. This type of operations are performed at server side.

Second thing is that,you should make use of algorithm that are irreversible in nature,that is decrypted value cant be reverted back to its original form.Theres wonderful article available for this by one of our valuable member OriginalGriff.

Password Storage: How to do it.[^]

Further,theres no need to make use of onBlur() etc. event,as you will have login button than perform the desired operations there only.Refer to below links.

How To: Hash Data Using MD5 and SHA1[^]

A Beginner's Tutorial for Understanding and Implementing Password Hashing and Salting[^]

The Art & Science of Storing Passwords[^]

Regards.. :laugh:
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900