BlockCipher, StreamCipherCFBBlockCipher, G3413CFBBlockCipher, G3413CTRBlockCipher, G3413OFBBlockCipher, GCFBBlockCipher, GOFBBlockCipher, KCTRBlockCipher, OFBBlockCipher, SICBlockCipherpublic 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, resetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlgorithmName, init, resetprotected StreamBlockCipher(BlockCipher cipher)
public BlockCipher getUnderlyingCipher()
public final byte returnByte(byte in)
StreamCipherreturnByte in interface StreamCipherin - the byte to be processed.public int processBytes(byte[] in,
int inOff,
int len,
byte[] out,
int outOff)
throws DataLengthException
StreamCipherprocessBytes in interface StreamCipherin - 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)