public class NoneCipher extends SshCipher
This special cipher implementation provides an unencrypted connection. This is not enabled by default and should be used with caution. To enable and use the cipher you should add the following code before you connect your SSH client.
SshConnector con = SshConnector.getInstance(); Ssh2Context ssh2Context = (Ssh2Context) con.getContext(SshConnector.SSH2); ssh2Context.supportedCiphers().add("none", NoneCipher.class); ssh2Context.setPreferredCipherCS("none"); ssh2Context.setPreferredCipherSC("none");
DECRYPT_MODE, ENCRYPT_MODE
Constructor and Description |
---|
NoneCipher() |
Modifier and Type | Method and Description |
---|---|
int |
getBlockSize()
Get the cipher block size.
|
int |
getKeyLength()
Return the key length required
|
String |
getProviderName() |
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.
|
getAlgorithm, getMacLength, getPriority, getSecurityLevel, isMAC, transform
public int getBlockSize()
getBlockSize
in class SshCipher
public int getKeyLength()
SshCipher
getKeyLength
in class SshCipher
public void init(int mode, byte[] iv, byte[] keydata) throws IOException
init
in class SshCipher
mode
- the mode to operateiv
- the initiaization vectorkeydata
- the key dataIOException
public void transform(byte[] src, int start, byte[] dest, int offset, int len) throws IOException
transform
in class SshCipher
src
- byte[]start
- intdest
- byte[]offset
- intlen
- intIOException
public String getProviderName()
getProviderName
in class SshCipher
Copyright © 2024. All rights reserved.