コード例 #1
0
 private static string GetDectryptString(string encryptValue)
 {
     if (encryptValue == null || Convert.ToString(encryptValue) == string.Empty)
     {
         return("");
     }
     return(CryptographyHelper.DecryptString(encryptValue, CryptographySettings.KeyPassword,
                                             CryptographySettings.SaltPassword));
 }
コード例 #2
0
 private static string GetEncryptString(string plainObject, string defaultValue)
 {
     if (plainObject == null || Convert.ToString(plainObject) == string.Empty)
     {
         return(defaultValue?.ToString());
     }
     return(CryptographyHelper.EncryptString(plainObject.ToString(), CryptographySettings.KeyPassword,
                                             CryptographySettings.SaltPassword));
 }