public static string Encrypt(this SecureString input)
{
byte[] encryptedData = System.Security.Cryptography.ProtectedData.Protect(
Encoding.Unicode.GetBytes(ToInsecureString(input)),
entropy,
System.Security.Cryptography.DataProtectionScope.CurrentUser);
return Convert.ToBase64String(encryptedData);
}