Ejemplo n.º 1
0
 public static string Encrypt(DataProtection.KeyType keyType, string plainText, string entropy, string description)
 {
     if (plainText == null)
     {
         plainText = string.Empty;
     }
     if (entropy == null)
     {
         entropy = string.Empty;
     }
     return(Convert.ToBase64String(DataProtection.Encrypt(keyType, Encoding.UTF8.GetBytes(plainText), Encoding.UTF8.GetBytes(entropy), description)));
 }
Ejemplo n.º 2
0
 public static string Encrypt(DataProtection.KeyType keyType, string plainText, string entropy)
 {
     return(DataProtection.Encrypt(keyType, plainText, entropy, string.Empty));
 }
Ejemplo n.º 3
0
 public static string Encrypt(string plainText)
 {
     return(DataProtection.Encrypt(DataProtection.defaultKeyType, plainText, string.Empty, string.Empty));
 }