| net.schmizz.sshj.transport.cipher.Cipher |
Known Indirect Subclasses
|
Class Overview
Wrapper for a cryptographic cipher, used either for encryption or decryption.
Summary
| Nested Classes |
|
enum |
Cipher.Mode |
|
| Public Methods |
|
abstract
int
|
getBlockSize()
|
|
abstract
int
|
getIVSize()
|
|
abstract
void
|
init(Cipher.Mode mode, byte[] key, byte[] iv)
Initialize the cipher for encryption or decryption with the given private key and initialization vector
|
|
abstract
void
|
update(byte[] input, int inputOffset, int inputLen)
Performs in-place encryption or decryption on the given data.
|
Public Methods
public
abstract
int
getBlockSize
()
Returns
- the block size for this cipher
public
abstract
int
getIVSize
()
Returns
- the size of the initialization vector
public
abstract
void
init
(Cipher.Mode mode, byte[] key, byte[] iv)
Initialize the cipher for encryption or decryption with the given private key and initialization vector
Parameters
| mode
| Whether this instance wil encrypt or decrypt |
| key
| The key for the cipher |
| iv
| Initialization vector
|
public
abstract
void
update
(byte[] input, int inputOffset, int inputLen)
Performs in-place encryption or decryption on the given data.
Parameters
| input
| The subject |
| inputOffset
| Offset at which to start |
| inputLen
| Number of bytes starting at inputOffset
|