mmmm...
questo è un algoritmo di cripting ma è unidirezionale,cioè non puoi decriptare :
codice:
using System.Security.Cryptography;
using System.Text;
using System.Security;
public string EncryptPassword (string clearPassword)
{
// don't change this!
byte[] key = new byte[20] {10, 20, 245, 187, 85, 11, 72, 16, 37, 88, 0, 45, 71, 98, 220, 201, 23, 77, 51, 121};
HMACSHA1 hmac = new HMACSHA1 (key);
byte[] encryptedPassword = hmac.ComputeHash (Encoding.UTF8.GetBytes (clearPassword));
return Convert.ToBase64String(encryptedPassword);
}