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/main/java/org/bouncycastle/crypto/StreamBlockCipher.java')
-rw-r--r--core/src/main/java/org/bouncycastle/crypto/StreamBlockCipher.java58
1 files changed, 0 insertions, 58 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/StreamBlockCipher.java b/core/src/main/java/org/bouncycastle/crypto/StreamBlockCipher.java
deleted file mode 100644
index 09aadfbf..00000000
--- a/core/src/main/java/org/bouncycastle/crypto/StreamBlockCipher.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package org.bouncycastle.crypto;
-
-/**
- * A parent class for block cipher modes that do not require block aligned data to be processed, but can function in
- * a streaming mode.
- */
-public abstract class StreamBlockCipher
- implements BlockCipher, StreamCipher
-{
- private final BlockCipher cipher;
-
- protected StreamBlockCipher(BlockCipher cipher)
- {
- this.cipher = cipher;
- }
-
- /**
- * return the underlying block cipher that we are wrapping.
- *
- * @return the underlying block cipher that we are wrapping.
- */
- public BlockCipher getUnderlyingCipher()
- {
- return cipher;
- }
-
- public final byte returnByte(byte in)
- {
- return calculateByte(in);
- }
-
- public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff)
- throws DataLengthException
- {
- if (outOff + len > out.length)
- {
- throw new DataLengthException("output buffer too short");
- }
-
- if (inOff + len > in.length)
- {
- throw new DataLengthException("input buffer too small");
- }
-
- int inStart = inOff;
- int inEnd = inOff + len;
- int outStart = outOff;
-
- while (inStart < inEnd)
- {
- out[outStart++] = calculateByte(in[inStart++]);
- }
-
- return len;
- }
-
- protected abstract byte calculateByte(byte b);
-} \ No newline at end of file