コード例 #1
0
ファイル: DesCipher.cs プロジェクト: z0rg1nc/CryptSharpFork
        /// <summary>
        /// Creates a DES cipher using the provided key.
        /// </summary>
        /// <param name="key">The DES key. This must be eight bytes.</param>
        /// <returns>A DES cipher.</returns>
        public static DesCipher Create(byte[] key)
        {
            Check.Length("key", key, 8, 8);

            DesCipher cipher = new DesCipher();
            cipher.ExpandKey(key);

            return cipher;
        }