This article shows you how to make a simple Password encryption Program.
Using the code
The main code used for the conversion is from the Microsoft.VisualBasic class. Below is the code that is used to convert a string to hexadecimal format. We can't direct convert all characters in to hexadecimal format (eg:@#$%^&*()) that's why firstly I take ASCII value of the character, and then convert ASCII value into hexadecimal format.
//For this I made while loop
while (Data.Length > 0)
{
//first I take each character using substring
sValue= Data.Substring(0, 1).ToString()
//then convert character into ascii.
sValue= Strings.Asc(sValue)
//then convert ascii value into Hex Format
sValue = Conversion.Hex(sValue)
//after converting remove the character.
Data = Data.Substring(1, Data.Length - 1);
sHex = sHex + sValue;
}
Ony two functions I used for this application
public string PasswordDecription(ref string Data)
{

jayesh sorathiaPosted Aug 30, 2012, 4:51 AM
To learn more on Password Encryption in .Net with C# Examples and VB.Net Examples In this Example we use MD5 algorithm. Means Encrypt password using MD5 algorithm. Visit this link. http://jayeshsorathia.blogspot.com/2012/08/net-tips-password-encryption-in-net.html
Gopal krishna DoraPosted Dec 28, 2007, 5:49 AM
Hi Josh thankx for ur usefull code,i have some doubt i am using asp.net with c# plz suggest me where i have to place the code.