com.maverick.ssh.components.standalone
Class Ssh1Des
java.lang.Object
com.maverick.ssh.components.SshCipher
com.maverick.ssh.components.standalone.Ssh1Des
public class Ssh1Des
- extends SshCipher
DES cipher for SSH1.
- Author:
- Lee David Painter
|
Method Summary |
void |
decrypt(byte[] src,
int srcOff,
byte[] dest,
int destOff,
int len)
|
void |
encrypt(byte[] src,
int srcOff,
byte[] dest,
int destOff,
int len)
|
java.lang.String |
getAlgorithm()
|
int |
getBlockSize()
Get the cipher block size. |
void |
init(int mode,
byte[] iv,
byte[] keydata)
Initialize the cipher with up to 40 bytes of iv and key data. |
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 |
Ssh1Des
public Ssh1Des()
getBlockSize
public int getBlockSize()
- Description copied from class:
SshCipher
- Get the cipher block size.
- Specified by:
getBlockSize in class SshCipher
- Returns:
- the block size in bytes.
getAlgorithm
public java.lang.String getAlgorithm()
- Overrides:
getAlgorithm in class SshCipher
init
public void init(int mode,
byte[] iv,
byte[] keydata)
- Description copied from class:
SshCipher
- Initialize the cipher with up to 40 bytes of iv and key data. Each implementation
should take as much data from the initialization as it needs ignoring any data
that it does not require.
- Specified by:
init in class SshCipher
- Parameters:
mode - the mode to operateiv - the initiaization vectorkeydata - the key data
transform
public void transform(byte[] src,
int start,
byte[] dest,
int offset,
int len)
throws java.io.IOException
- Description copied from class:
SshCipher
- 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.
- Specified by:
transform in class SshCipher
- Throws:
java.io.IOException
encrypt
public void encrypt(byte[] src,
int srcOff,
byte[] dest,
int destOff,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
decrypt
public void decrypt(byte[] src,
int srcOff,
byte[] dest,
int destOff,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.