Example #1
0
        /// <summary>
        /// 对称加密算法-解密
        /// </summary>
        /// <param name="decryptBytes">密文</param>
        /// <param name="key">key</param>
        /// <returns>明文</returns>
        public static byte[] SymmetricDecryptStream(byte[] decryptBytes, string key)
        {
            ISecurity security = new DECEncryption();

            return(security.DecryptStream(decryptBytes, key));
        }
Example #2
0
        /// <summary>
        /// DEC加密算法-解密
        /// </summary>
        /// <param name="decryptStr">密文</param>
        /// <returns>明文</returns>
        public static string DECDecrypt(string decryptStr)
        {
            ISecurity security = new DECEncryption();

            return(security.Decryption(decryptStr));
        }
Example #3
0
        /// <summary>
        /// 对称加密算法-加密
        /// </summary>
        /// <param name="encryptStream">明文</param>
        /// <param name="key">key</param>
        /// <returns>密文</returns>
        public static byte[] SymmetricEncryptStream(byte[] encryptStream, string key)
        {
            ISecurity security = new DECEncryption();

            return(security.EncryptStream(encryptStream, key));
        }
Example #4
0
        /// <summary>
        /// DEC加密算法-加密
        /// </summary>
        /// <param name="encryptStr">明文</param>
        /// <returns>密文</returns>
        public static string DECEncrypt(string encryptStr)
        {
            ISecurity security = new DECEncryption();

            return(security.Encryption(encryptStr));
        }