Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In login page user enter login id and password., the password should encrypt with 32bit and password encryption should be dynamic.

example:

1st time login
JavaScript
password: abcd  =>   xcvb12ncn(encrypted password)


2nd time login
JavaScript
password abcd   =>   dfghgfgh5(encrypted password)


where login password is same but encrypted password is differ.
I need like this !



Give me a solution anyone !
Posted
Updated 14-Apr-14 19:29pm
v3

 
Share this answer
 
Comments
Pugal Kannan 15-Apr-14 1:41am    
I already encrypted password as 32bit character in client side, but the password encryption should be dynamic.

example:

1st time login

password: abcd => xcvb12ncn(encrypted password)


2nd time login

password abcd => dfghgfgh5(encrypted password)
Snesh Prajapati 15-Apr-14 2:50am    
You can use password salt as described:
http://stackoverflow.com/questions/3753226/create-password-and-passwordsalt
https://crackstation.net/hashing-security.htm
Plz try ths for encryption...

C#
System.Web.Security.FormsAuthenticationTicket EncPass = new         FormsAuthenticationTicket(txtPass.Text.Trim(), false, 600);
System.Web.Security.FormsAuthenticationTicket EncUser = new FormsAuthenticationTicket(txtUser.Text.Trim(), false, 600);
            // returns encrypted string.
            string pass = FormsAuthentication.Encrypt(EncPass);
            string User = FormsAuthentication.Encrypt(EncUser);
            //Setting the Cookies value. 

            Response.Cookies["UName"].Value = User;
            Response.Cookies["PWD"].Value = pass;
            Response.Cookies["UName"].Expires = DateTime.Now.AddDays(30);
            Response.Cookies["PWD"].Expires = DateTime.Now.AddDays(30);
 
Share this answer
 
v2
Comments
Pugal Kannan 15-Apr-14 1:32am    
I like your code , but i need client side dynamic encryption!
Login info is very sensitive which should be carefully handled. See my answer related to this one.

saving password in encrypted form during registering in login form[^]

Remember, no encryption is secured.

Regards.
 
Share this answer
 

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