diff --git a/crypto/test/src/crypto/io/test/CipherStreamTest.cs b/crypto/test/src/crypto/io/test/CipherStreamTest.cs
index 799b44521..9dc1f4c2a 100644
--- a/crypto/test/src/crypto/io/test/CipherStreamTest.cs
+++ b/crypto/test/src/crypto/io/test/CipherStreamTest.cs
@@ -144,8 +144,8 @@ namespace Org.BouncyCastle.Crypto.IO.Tests
IBlockCipher blockCipher = AesUtilities.CreateEngine();
int bits = 8 * blockCipher.GetBlockSize(); // TODO Is this right?
- blockCipher = new CfbBlockCipher(blockCipher, bits);
- IBufferedCipher cipher = new BufferedBlockCipher(blockCipher);
+ IBlockCipherMode blockCipherMode = new CfbBlockCipher(blockCipher, bits);
+ IBufferedCipher cipher = new BufferedBlockCipher(blockCipherMode);
// SecureRandom random = new SecureRandom();
byte[] keyBytes = new byte[32];
diff --git a/crypto/test/src/crypto/prng/test/CtrDrbgTest.cs b/crypto/test/src/crypto/prng/test/CtrDrbgTest.cs
index 3e90c5752..047405c77 100644
--- a/crypto/test/src/crypto/prng/test/CtrDrbgTest.cs
+++ b/crypto/test/src/crypto/prng/test/CtrDrbgTest.cs
@@ -497,11 +497,6 @@ namespace Org.BouncyCastle.Crypto.Prng.Test
get { return cipher.AlgorithmName; }
}
- public bool IsPartialBlockOkay
- {
- get { return false; }
- }
-
public int GetBlockSize()
{
return cipher.GetBlockSize();
@@ -520,11 +515,6 @@ namespace Org.BouncyCastle.Crypto.Prng.Test
return cipher.ProcessBlock(input, output);
}
#endif
-
- public void Reset()
- {
- cipher.Reset();
- }
}
}
}
diff --git a/crypto/test/src/crypto/test/NullTest.cs b/crypto/test/src/crypto/test/NullTest.cs
deleted file mode 100644
index 0bc9d28cf..000000000
--- a/crypto/test/src/crypto/test/NullTest.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-using System;
-
-using NUnit.Framework;
-
-using Org.BouncyCastle.Crypto.Engines;
-using Org.BouncyCastle.Crypto.Parameters;
-using Org.BouncyCastle.Utilities.Encoders;
-using Org.BouncyCastle.Utilities.Test;
-
-namespace Org.BouncyCastle.Crypto.Tests
-{
- [TestFixture]
- public class NullTest
- : CipherTest
- {
- static SimpleTest[] tests =
- {
- new BlockCipherVectorTest(0, new NullEngine(),
- new KeyParameter(Hex.Decode("00")), "00", "00")
- };
-
- public NullTest()
- : base(tests, new NullEngine(), new KeyParameter(new byte[2]))
- {
- }
-
- public override string Name
- {
- get { return "Null"; }
- }
-
- public override void PerformTest()
- {
- base.PerformTest();
-
- IBlockCipher engine = new NullEngine();
-
- engine.Init(true, null);
-
- byte[] buf = new byte[1];
-
- engine.ProcessBlock(buf, 0, buf, 0);
-
- if (buf[0] != 0)
- {
- Fail("NullCipher changed data!");
- }
-
- byte[] shortBuf = new byte[0];
-
- try
- {
- engine.ProcessBlock(shortBuf, 0, buf, 0);
-
- Fail("failed short input check");
- }
- catch (DataLengthException)
- {
- // expected
- }
-
- try
- {
- engine.ProcessBlock(buf, 0, shortBuf, 0);
-
- Fail("failed short output check");
- }
- catch (DataLengthException)
- {
- // expected
- }
- }
-
- [Test]
- public void TestFunction()
- {
- string resultText = Perform().ToString();
-
- Assert.AreEqual(Name + ": Okay", resultText);
- }
- }
-}
|