Esempio n. 1
0
 internal string HandleCrypto(string s)
 {
     if (IsEncryptMode)
     {
         return(CryptoHelpers.Encrypt(Rsa, s));
     }
     else
     {
         return(CryptoHelpers.Decrypt(Rsa, s));
     }
 }
Esempio n. 2
0
        public bool TryDecryptOrValue(string value, out string decryptedValue)
        {
            bool ok = false;

            decryptedValue = value;
            try
            {
                decryptedValue = CryptoHelpers.Decrypt(Rsa, value);
                ok             = true;
            }
            catch { }

            return(ok);
        }
Esempio n. 3
0
 public string Decrypt(string s)
 {
     return(CryptoHelpers.Decrypt(Rsa, s));
 }