/// <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 }
/// <inheritdoc /> public override void Reset() { IV.DeepCopy_NoChecks(0, _counter, 0, CipherBlockSize); BlockCipher.Reset(); }