Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/java/org/bouncycastle/crypto/test/StreamCipherVectorTest.java')
-rw-r--r--core/src/test/java/org/bouncycastle/crypto/test/StreamCipherVectorTest.java62
1 files changed, 0 insertions, 62 deletions
diff --git a/core/src/test/java/org/bouncycastle/crypto/test/StreamCipherVectorTest.java b/core/src/test/java/org/bouncycastle/crypto/test/StreamCipherVectorTest.java
deleted file mode 100644
index 7b788280..00000000
--- a/core/src/test/java/org/bouncycastle/crypto/test/StreamCipherVectorTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.bouncycastle.crypto.test;
-
-import org.bouncycastle.crypto.CipherParameters;
-import org.bouncycastle.crypto.StreamCipher;
-import org.bouncycastle.util.encoders.Hex;
-import org.bouncycastle.util.test.SimpleTest;
-
-/**
- * a basic test that takes a stream cipher, key parameter, and an input
- * and output string.
- */
-public class StreamCipherVectorTest
- extends SimpleTest
-{
- int id;
- StreamCipher cipher;
- CipherParameters param;
- byte[] input;
- byte[] output;
-
- public StreamCipherVectorTest(
- int id,
- StreamCipher cipher,
- CipherParameters param,
- String input,
- String output)
- {
- this.id = id;
- this.cipher = cipher;
- this.param = param;
- this.input = Hex.decode(input);
- this.output = Hex.decode(output);
- }
-
- public String getName()
- {
- return cipher.getAlgorithmName() + " Vector Test " + id;
- }
-
- public void performTest()
- {
- cipher.init(true, param);
-
- byte[] out = new byte[input.length];
-
- cipher.processBytes(input, 0, input.length, out, 0);
-
- if (!areEqual(out, output))
- {
- fail("failed.", new String(Hex.encode(output)) , new String(Hex.encode(out)));
- }
-
- cipher.init(false, param);
-
- cipher.processBytes(output, 0, output.length, out, 0);
-
- if (!areEqual(input, out))
- {
- fail("failed reversal");
- }
- }
-}