BlockCipher
, StreamCipher
CFBBlockCipher
, G3413CFBBlockCipher
, G3413CTRBlockCipher
, G3413OFBBlockCipher
, GCFBBlockCipher
, GOFBBlockCipher
, KCTRBlockCipher
, OFBBlockCipher
, SICBlockCipher
public abstract class StreamBlockCipher extends java.lang.Object implements BlockCipher, StreamCipher
Modifier | Constructor | Description |
---|---|---|
protected |
StreamBlockCipher(BlockCipher cipher) |
Modifier and Type | Method | 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.
|
getAlgorithmName, getBlockSize, init, processBlock, reset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlgorithmName, init, 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)