hi,
encrypt Your password before saving in DB
for encryption write following function
public string GetEncryptedPassword(string password)
{
string newPass = string.Empty;
int num = new Random().Next(1, 10);
foreach (char ch in password)
{
newPass += (char)(ch + num);
}
newPass += (char)num;
return newPass;
}
for Decryption
public string GetDecryptedPassword(string password)
{
string decryptedPassword = string.Empty;
int num = (int)password[password.Length - 1];
password = password.Remove(password.Length - 1, 1);
foreach (char ch in password)
{
decryptedPassword += (char)(ch - num);
}
return decryptedPassword;
}
Hope it will help u
Best Luck
Happy Codeing:)