|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the interface for all SSH ciphers. Any cipher class that implements this interface can be used for encryption within the SSH protocol. Third party implementations can dynamically add new ciphers to existing J2SSH installations by inserting a CipherAlgorithm element into the SSH API configuration file ssh.xml. The algorithm name must follow the name@domain syntax.
Field Summary | |
static int |
DECRYPT_MODE
Declares the cipher as decrypting |
static int |
ENCRYPT_MODE
Declares the cipher as encrypting |
Method Summary | |
int |
getBlockSize()
Gets the blockSize of the cipher |
void |
init(int mode,
byte[] iv,
byte[] keydata)
Called to initiate the cipher after construction. |
byte[] |
transform(byte[] data)
Called to transform the supplied data according to the cipher mode. |
byte[] |
transform(byte[] data,
int offset,
int len)
Called to transform the supplied data according to the cipher mode. |
Field Detail |
public static final int ENCRYPT_MODE
public static final int DECRYPT_MODE
Method Detail |
public void init(int mode, byte[] iv, byte[] keydata) throws AlgorithmOperationException
Called to initiate the cipher after construction.
mode
- The cipher mode ENCRYPT_MODE |
DECRYPT_MODEiv
- The iv data output from key
exchangekeydata
- The key data output from key
exchange
AlgorithmOperationException
- Throw if an error occurspublic byte[] transform(byte[] data) throws AlgorithmOperationException
Called to transform the supplied data according to the cipher mode.
data
- The untransformed data
AlgorithmOperationException
- Throw if an error occurspublic byte[] transform(byte[] data, int offset, int len) throws AlgorithmOperationException
Called to transform the supplied data according to the cipher mode.
data
- The untransformed dataoffset
- The offset to start in the datalen
- The length to transform
AlgorithmOperationException
- Throw if an error occurspublic int getBlockSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |