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 final int | |
| private final byte[] | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | decrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset)
Implements abstract com. Performs decryption operation. |
| pack-priv int | decryptFinal(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset)
Overrides com. Performs decryption operation for the last time. |
| 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 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)cipherOverrides com. Performs last encryption operation. |
| pack-priv String | Returns: the stringOFBImplements 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. |
| k | back to summary |
|---|---|
| private final byte[] k | |
| numBytes | back to summary |
|---|---|
| private final int numBytes | |
| register | back to summary |
|---|---|
| private final byte[] register | |
| registerSave | back to summary |
|---|---|
| private byte[] registerSave | |
| OutputFeedback | back to summary |
|---|---|
| pack-priv OutputFeedback(SymmetricCipher embeddedCipher, int numBytes) | |
| decrypt | back to summary |
|---|---|
| pack-priv int decrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) Implements abstract com. Doc from com. Performs decryption operation. The input The subclass that implements Cipher should ensure that
| |
| decryptFinal | back to summary |
|---|---|
| pack-priv int decryptFinal(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) Overrides com. Doc from com. Performs decryption operation for the last time. Note For cipher feedback modes which does not perform
special handling for the last few blocks, this is essentially
the same as | |
| 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
| |
| encryptFinal | back to summary |
|---|---|
| pack-priv int encryptFinal(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) Overrides com. Performs last 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. | |