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.
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 in, int the offset in inOff, int cipherOffset the length of the input data len, byte[] the buffer for the result out, int the offset in outOff)plain Implements abstract com. |
pack-priv int | Returns: the length of the encrypted datathe buffer with the input data to be encrypted in, int the offset in inOff, int plain the length of the input data len, byte[] the buffer for the result out, int the offset in outOff)cipher Implements abstract com. |
pack-priv String | Returns: the name of the feedback mechanismImplements abstract com. |
private int | |
private int | |
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. |
pack-priv void | reset()
Implements abstract com. |
pack-priv void | restore()
Implements abstract com. |
pack-priv void | save()
Implements abstract com. |
ElectronicCodeBook | back to summary |
---|---|
pack-priv ElectronicCodeBook(SymmetricCipher embeddedCipher) |
decrypt | back to summary |
---|---|
pack-priv int decrypt(byte[] in, int inOff, int len, byte[] out, int outOff) Implements abstract com. Performs decryption operation. The input cipher text
|
encrypt | back to summary |
---|---|
pack-priv int encrypt(byte[] in, int inOff, int len, byte[] out, int outOff) 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 the feedback mechanism
|
implECBDecrypt | back to summary |
---|---|
private int implECBDecrypt(byte[] in, int inOff, int len, byte[] out, int outOff)
|
implECBEncrypt | back to summary |
---|---|
private int implECBEncrypt(byte[] in, int inOff, int len, byte[] out, int outOff)
|
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. |