Ejemplo n.º 1
0
        /// <summary>解密算法</summary>
        /// <param name="encryptedText">加密文本</param>
        /// <param name="key">密钥密钥(16位)</param>
        /// <returns>明文</returns>
        public static string Decrypt(string encryptedText, string key)
        {
            var helper = new CryptoHelper(key);

            return(helper.Decrypt(encryptedText));
        }
Ejemplo n.º 2
0
        /// <summary>加密算法</summary>
        /// <param name="clearText">明文</param>
        /// <param name="key">密钥(16位)</param>
        /// <returns>加密文本</returns>
        public static string Encrypt(string clearText, string key)
        {
            var helper = new CryptoHelper(key);

            return(helper.Encrypt(clearText));
        }