private static string EncryptString(string clearText, string Password)
        {
            SymmetricAlgorithm rijndaelForKey = OldCryptoPrefsEncryptor.getRijndaelForKey(Password);

            byte[] bytes   = Encoding.Unicode.GetBytes(clearText);
            byte[] inArray = OldCryptoPrefsEncryptor.EncryptString(bytes, rijndaelForKey);
            return(Convert.ToBase64String(inArray));
        }
        private static string DecryptString(string cipherText, string Password)
        {
            byte[]             cipherData     = Convert.FromBase64String(cipherText);
            SymmetricAlgorithm rijndaelForKey = OldCryptoPrefsEncryptor.getRijndaelForKey(Password);

            byte[] array = OldCryptoPrefsEncryptor.DecryptString(cipherData, rijndaelForKey);
            return(Encoding.Unicode.GetString(array, 0, array.Length));
        }
        public static string GetString(string key, string defaultValue = "")
        {
            string text  = OldCryptoPrefsEncryptor.Md5Sum(key);
            string text2 = OldCryptoPrefsEncryptor.decrypt(text, defaultValue);
            string text3 = text2;

            {
                int num  = OldCryptoPrefsEncryptor.computeXorOperand(key, text);
                int num2 = OldCryptoPrefsEncryptor.computePlusOperand(num);
                text3 = string.Empty;
                foreach (char c in text2)
                {
                    char c2 = (char)((num ^ (int)c) - num2);
                    text3 += c2;
                }
            }
            return(text3);
        }
 private static string decrypt(string cKey, string val)
 {
     return(OldCryptoPrefsEncryptor.DecryptString(val, OldCryptoPrefsEncryptor.getEncryptionPassword(cKey)));
 }
 private static string getEncryptionPassword(string pw)
 {
     return(OldCryptoPrefsEncryptor.Md5Sum(pw + OldCryptoPrefsEncryptor.SaltString));
 }