Exemplo n.º 1
0
        /// <inheritdoc />
        protected override void InitState(byte[] key)
        {
            // Prepend the supplied IV with zeros (as per FIPS PUB 81)
            byte[] workingIv = new byte[CipherBlockSize];
            IV.DeepCopy_NoChecks(0, workingIv, CipherBlockSize - IV.Length, IV.Length);
            Array.Clear(workingIv, 0, CipherBlockSize - IV.Length);
            IV = workingIv;

            Reset();
            BlockCipher.Init(true, key); // Streaming mode - cipher always used in encryption mode
        }
Exemplo n.º 2
0
 /// <inheritdoc />
 protected override void InitState(byte[] key)
 {
     BlockCipher.Init(Encrypting, key);
     Reset();
 }
Exemplo n.º 3
0
 /// <inheritdoc />
 protected override void InitState(byte[] key)
 {
     Reset();
     BlockCipher.Init(true, key); // Streaming mode - cipher always used in encryption mode
 }