This mode is implemented independently of a particular cipher. Ciphers to which this mode should apply (e.g., DES) must be plugged-in using the constructor.
Note
This class does not deal with buffering or padding.
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | Returns: the length of the decrypted datathe buffer with the input data to be decrypted cipher, int the offset in cipherOffset, int cipherOffsetthe length of the input data cipherLen, byte[] the buffer for the result plain, int the offset in plainOffset)plainImplements abstract com. Performs decryption operation. |
| pack-priv int | Returns: the length of the encrypted datathe buffer with the input data to be encrypted plain, int the offset in plainOffset, int plainthe length of the input data plainLen, byte[] the buffer for the result cipher, int the offset in cipherOffset)cipherImplements abstract com. Performs encryption operation. |
| pack-priv String | Returns: the stringPCBCImplements abstract com. Gets the name of this feedback mode. |
| pack-priv void | init(boolean
flag indicating encryption or decryption decrypting, String the algorithm name algorithm, byte[] the key key, byte[] the iv iv)Implements abstract com. Initializes the cipher in the specified mode with the given key and iv. |
| pack-priv void | reset()
Implements abstract com. Resets the iv to its original value. |
| pack-priv void | restore()
Implements abstract com. Restores the content of this cipher to the previous saved one. |
| pack-priv void | save()
Implements abstract com. Save the current content of this cipher. |
| PCBC | back to summary |
|---|---|
| pack-priv PCBC(SymmetricCipher embeddedCipher) | |
| decrypt | back to summary |
|---|---|
| pack-priv int decrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) Implements abstract com. Performs decryption operation. The input cipher text
| |
| encrypt | back to summary |
|---|---|
| pack-priv int encrypt(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) Implements abstract com. Performs encryption operation. The input plain text
| |
| getFeedback | back to summary |
|---|---|
| pack-priv String getFeedback() Implements abstract com. Gets the name of this feedback mode.
| |
| init | back to summary |
|---|---|
| pack-priv void init(boolean decrypting, String algorithm, byte[] key, byte[] iv) throws InvalidKeyException Implements abstract com. Initializes the cipher in the specified mode with the given key and iv.
| |
| reset | back to summary |
|---|---|
| pack-priv void reset() Implements abstract com. Resets the iv to its original value. This is used when doFinal is called in the Cipher class, so that the cipher can be reused (with its original iv). | |
| restore | back to summary |
|---|---|
| pack-priv void restore() Implements abstract com. Restores the content of this cipher to the previous saved one. | |
| save | back to summary |
|---|---|
| pack-priv void save() Implements abstract com. Save the current content of this cipher. | |