/// <summary> /// 构造DES加密对象 /// </summary> /// <param name="key">密钥</param> /// <param name="cipher">加密模式</param> /// <param name="padding">补位方式</param> public static Descrypt Create(Byte[] key, CipherMode cipher, PaddingMode padding) { Descrypt instance = new Descrypt(); instance.Init(key, cipher, padding); return(instance); }
/// <summary> /// 构造DES加密对象,使用CBC加密模式,无补位 /// </summary> /// <param name="key">密钥</param> public static Descrypt Create(Byte[] key) { Descrypt instance = new Descrypt(); instance.Init(key, CipherMode.CBC, PaddingMode.None); return(instance); }