cryptix.provider.mode
Class PCBC
- FeedbackCipher, Parameterized, SymmetricCipher
- David Hopwood
- Raif S. Naffah
- Cryptix 2.2.2
PCBC() - Constructs a PCBC cipher, assuming that the IV will be provided
via
setInitializationVector .
|
PCBC(Cipher cipher) - Constructs a PCBC cipher, assuming that the IV will be provided
via
setInitializationVector .
|
PCBC(Cipher cipher, byte[] iv) - Constructs a PCBC cipher, using an initialization vector
provided in the constructor.
|
protected int | engineBlockSize() - SPI: Returns the length of a block, in bytes.
|
protected void | engineInitDecrypt(Key newkey) - SPI: Initializes this cipher for decryption, using the
specified key.
|
protected void | engineInitEncrypt(Key newkey) - SPI: Initializes this cipher for encryption, using the
specified key.
|
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.
|
blockSize , clone , crypt , crypt , crypt , doFinal , doFinal , doFinal , doFinal , engineBlockSize , engineCiphertextBlockSize , engineCrypt , engineGetParameter , engineInBufferSize , engineInitDecrypt , engineInitEncrypt , engineOutBufferSize , enginePlaintextBlockSize , engineSetPaddingScheme , engineSetParameter , engineUpdate , getAlgorithm , getAlgorithms , getAlgorithms , getCiphertextBlockSize , getInputBlockSize , getInstance , getInstance , getInstance , getMode , getOutputBlockSize , getPadding , getPaddingScheme , getParameter , getPlaintextBlockSize , getProvider , getState , inBufferSize , inBufferSizeFinal , initDecrypt , initEncrypt , isPaddingBlockCipher , outBufferSize , outBufferSizeFinal , setParameter , toString , update , update , update , update |
PCBC
public PCBC()
Constructs a PCBC cipher, assuming that the IV will be provided
via
setInitializationVector
.
The IV value should be random, but unlike
CFB mode, it is not
absolutely required to be unique.
PCBC
public PCBC(Cipher cipher)
Constructs a PCBC cipher, assuming that the IV will be provided
via setInitializationVector
.
See the previous constructor for more details.
PCBC
public PCBC(Cipher cipher,
byte[] iv)
Constructs a PCBC cipher, using an initialization vector
provided in the constructor.
The IV value 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.
cipher
- the block cipher to useiv
- the initial value for the shift register (IV)
engineBlockSize
protected int engineBlockSize()
SPI: Returns the length of a block, in bytes. Ciphers for
which plaintext and ciphertext blocks are the same size may override
this method. Otherwise, both enginePlaintextBlockSize and
engineCiphertextBlockSize should be overridden.
The value may change when
initEncrypt
or
initDecrypt
is called, but it should not change at
other times.
- engineBlockSize in interface Cipher
- the length in bytes of a block for this cipher.
engineInitDecrypt
protected void engineInitDecrypt(Key newkey)
throws KeyException
SPI: Initializes this cipher for decryption, using the
specified key.
After a call to this method, the cipher's state is set to DECRYPT.
- engineInitDecrypt in interface Cipher
engineInitEncrypt
protected void engineInitEncrypt(Key newkey)
throws KeyException
SPI: Initializes this cipher for encryption, using the
specified key.
After a call to this method, the cipher's state is set to ENCRYPT.
- engineInitEncrypt in interface Cipher
engineSetCipher
protected void engineSetCipher(Cipher cipher)
- engineSetCipher in interface FeedbackMode
engineUpdate
protected int engineUpdate(byte[] in,
int inOffset,
int inLen,
byte[] out,
int outOffset)
SPI: This is the main engine method for updating data.
It may be called with any size of input.
in
and
out
may be the same array, and the
input and output regions may overlap.
- engineUpdate in interface Cipher
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.
- the number of bytes written.