|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maverick.ssh.cipher.SshCipher
Base class for all SSH Transport Protocol ciphers. The cipher itself has 2 modes, encryption or decrpytion. The same method is used to transporm the data depending upon the mode.
Field Summary | |
static int |
DECRYPT_MODE
Decryption mode. |
static int |
ENCRYPT_MODE
Encryption mode. |
Constructor Summary | |
SshCipher(java.lang.String algorithm)
|
Method Summary | |
java.lang.String |
getAlgorithm()
|
abstract int |
getBlockSize()
Get the cipher block size. |
abstract void |
init(int mode,
byte[] iv,
byte[] keydata)
Initialize the cipher with up to 40 bytes of iv and key data. |
void |
transform(byte[] data)
Transform the byte array according to the cipher mode. |
abstract void |
transform(byte[] src,
int start,
byte[] dest,
int offset,
int len)
Transform the byte array according to the cipher mode; it is legal for the source and destination arrays to reference the same physical array so care should be taken in the transformation process to safeguard this rule. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ENCRYPT_MODE
public static final int DECRYPT_MODE
Constructor Detail |
public SshCipher(java.lang.String algorithm)
Method Detail |
public java.lang.String getAlgorithm()
public abstract int getBlockSize()
public abstract void init(int mode, byte[] iv, byte[] keydata) throws java.io.IOException
mode
- the mode to operateiv
- the initiaization vectorkeydata
- the key data
java.io.IOException
public void transform(byte[] data) throws java.io.IOException
data
-
java.io.IOException
public abstract void transform(byte[] src, int start, byte[] dest, int offset, int len) throws java.io.IOException
offset
- len
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |