Click here to Skip to main content
15,919,479 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to encrypt a password field in sql server2005?
Posted
Updated 20-Oct-12 12:59pm
v2

Kindly refer this.
It is well explained and sample code also available.

Different Level of Encryption in SQL[^]
 
Share this answer
 
Often a oneway "encryption" is sufficient: add some "salt" to the clear text password, then hash it with MD5, SHA1 or other hash functions. When the user tries to log in, just follow the same procedure and compare the "encrypted" values.
If you need to retrieve the original clear text password from the value stored in the database, you need a real encryption method. The System.Security.Cryptography namespace offers some methods.
 
Share this answer
 
you Can use this coding for making secure password

C#
string s = "Foo bar";
string s1 = Convert.ToBase64String(Encoding.Unicode.GetBytes(s));

' And back...
string s2 = Encoding.Unicode.GetString(Convert.FromBase64String(s1));


thanks
 
Share this answer
 
 
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