public abstract class StreamBlockCipher extends DefaultMultiBlockCipher implements StreamCipher
Modifier | Constructor and Description |
---|---|
protected |
StreamBlockCipher(BlockCipher cipher) |
Modifier and Type | Method and Description |
---|---|
protected abstract byte |
calculateByte(byte b) |
BlockCipher |
getUnderlyingCipher()
return the underlying block cipher that we are wrapping.
|
int |
processBytes(byte[] in,
int inOff,
int len,
byte[] out,
int outOff)
process a block of bytes from in putting the result into out.
|
byte |
returnByte(byte in)
encrypt/decrypt a single byte returning the result.
|
getMultiBlockSize, processBlocks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlgorithmName, init, reset
getAlgorithmName, getBlockSize, init, processBlock, reset
protected StreamBlockCipher(BlockCipher cipher)
public BlockCipher getUnderlyingCipher()
public final byte returnByte(byte in)
StreamCipher
returnByte
in interface StreamCipher
in
- the byte to be processed.public int processBytes(byte[] in, int inOff, int len, byte[] out, int outOff) throws DataLengthException
StreamCipher
processBytes
in interface StreamCipher
in
- the input byte array.inOff
- the offset into the in array where the data to be processed starts.len
- the number of bytes to be processed.out
- the output buffer the processed bytes go into.outOff
- the offset into the output byte array the processed data starts at.DataLengthException
- if the output buffer is too small.protected abstract byte calculateByte(byte b)