cryptix.provider.mode
public class CFB extends FeedbackMode
The full block size of the supplied cipher is used for the Cipher Feedback Mode. The bytes supplied are processed and returned immediately.
References:
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.5 $
Since: Cryptix 2.2.2
Constructor Summary | |
---|---|
CFB()
Constructs a CFB mode object.
| |
CFB(Cipher cipher)
Constructs a CFB cipher, assuming that the IV will be provided
via setInitializationVector .
| |
CFB(Cipher cipher, byte[] iv)
Constructs a CFB cipher, using an initialization vector
provided in the constructor.
|
Method Summary | |
---|---|
protected int | engineBlockSize() |
protected void | engineInitDecrypt(Key newkey) |
protected void | engineInitEncrypt(Key newkey) |
protected void | engineSetCipher(Cipher cipher) |
protected int | engineUpdate(byte[] in, int inOffset, int inLen, byte[] out, int outOffset)
SPI: This is the main engine method for updating data.
|
protected void | next_block()
Rotates the IV left by currentByte bytes, to mimic the V2.2
behaviour. |
The IV is provided via setInitializationVector
. This IV
must be unique during the lifetime of the key. If it is not
unique, at least the first block of the plaintext can be recovered.
setInitializationVector
.
See the previous constructor for more details.
Parameters: cipher the cipher object to use in CFB mode.
Throws: NullPointerException if cipher == null
Parameters: cipher the block cipher to use iv the initial value for the shift register (IV)
Throws: NullPointerException if cipher == null
in
and out
may be the same array, and the
input and output regions may overlap.
Parameters: in the input data. inOffset the offset into in
specifying where
the data starts. inLen the length of the subarray. out the output array. outOffset the offset indicating where to start writing into
the out
array.
Returns: the number of bytes written.
See Also: CFB_PGP