Esempio 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)));
 }
Esempio n. 2
0
 public static string Encrypt(DataProtection.KeyType keyType, string plainText, string entropy)
 {
     return(DataProtection.Encrypt(keyType, plainText, entropy, string.Empty));
 }
Esempio n. 3
0
 public static string Encrypt(string plainText)
 {
     return(DataProtection.Encrypt(DataProtection.defaultKeyType, plainText, string.Empty, string.Empty));
 }