Пример #1
0
        /// <summary>
        /// 快速使用解密
        /// </summary>
        /// <param name="encryptedText">密文</param>
        /// <param name="key">密钥</param>
        /// <returns></returns>
        public static string DecryptFast(string encryptedText, string key = "ABCDEFGHIJKLMNOP")
        {
            SymmetricEncryptHelper helper = new SymmetricEncryptHelper(key);

            return(helper.Decrypt(encryptedText));
        }
Пример #2
0
        /// <summary>
        /// 快速使用加密算法
        /// </summary>
        /// <param name="clearText">明文</param>
        /// <param name="key">密钥</param>
        /// <returns></returns>
        public static string EncryptFast(string clearText, string key = "ABCDEFGHIJKLMNOP")
        {
            SymmetricEncryptHelper helper = new SymmetricEncryptHelper(key);

            return(helper.Encrypt(clearText));
        }