Source of my EncryptMe Function
public string EncryptMe(string s)
{
byte[] bytes =
System.Text.Encoding.Unicode.GetBytes(s);
byte[] data = new byte[0x10];
new
System.Security.Cryptography.RNGCryptoServiceProvider().GetBytes(data);
byte[] dst = new byte[data.Length +
bytes.Length];
Buffer.BlockCopy(data, 0, dst, 0,
data.Length);
Buffer.BlockCopy(bytes, 0, dst,
data.Length, bytes.Length);
byte[] b =
EncryptPassword(dst);
return Convert.ToBase64String(b);
}
|