Exemple #1
0
 static void Decrypt(AuditConfig conf)
 {
     conf.Traces.ForEach((trace) => {
         trace.Instance.Password    = EncryptionUtils.Decrypt(conf)(trace.Instance.Password);
         trace.EmailConfig.Password = EncryptionUtils.Decrypt(conf)(trace.EmailConfig.Password);
     });
 }
 public static Func <string, string> Decrypt(AuditConfig conf)
 {
     if (conf.Encryption == EncryptionOptions.None)
     {
         return(new Func <string, string>((text) => text));
     }
     else if (conf.Encryption == EncryptionOptions.Normal)
     {
         return(EncryptionUtils.Decrypt);
     }
     else
     {
         return(new Func <string, string>((plain) => EncryptionUtils.Decrypt(EncryptionUtils.GetMachineID(), plain)));
     }
 }