Beispiel #1
0
        /// <summary>
        /// 构造3DES加密对象
        /// </summary>
        /// <param name="cipher">加密模式</param>
        /// <param name="padding">补位方式</param>
        public static Tripledescrypt Create(CipherMode cipher, PaddingMode padding)
        {
            Tripledescrypt instance = new Tripledescrypt();

            instance.Init(cipher, padding);
            return(instance);
        }
Beispiel #2
0
        /// <summary>
        /// 构造3DES加密对象,使用CBC加密模式,无补位
        /// </summary>
        public static Tripledescrypt Create()
        {
            Tripledescrypt instance = new Tripledescrypt();

            instance.Init(CipherMode.CBC, PaddingMode.None);
            return(instance);
        }