public class AbstractJCECipher extends SshCipher
An abstract base class for defining SSH ciphers which use a JCE provider instead of the internal Maverick Crypto provider.
DECRYPT_MODE, ENCRYPT_MODE| Constructor and Description |
|---|
AbstractJCECipher(String spec,
String keyspec,
int keylength,
String algorithm) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBlockSize()
Get the cipher block size.
|
String |
getProvider() |
void |
init(int mode,
byte[] iv,
byte[] keydata)
Initialize the cipher with up to 40 bytes of iv and key data.
|
void |
transform(byte[] buf,
int start,
byte[] output,
int off,
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, transformpublic AbstractJCECipher(String spec, String keyspec, int keylength, String algorithm) throws IOException
spec - the value passed into Cipher.getInstance() that specifies the
specification of the cipher; for example
"Blowfish/CBC/NoPadding"keyspec - the value passed into the constructor of SecretKeySpec.keylength - int the length in bytes of the keyIOExceptionpublic void transform(byte[] buf,
int start,
byte[] output,
int off,
int len)
throws IOException
SshCiphertransform in class SshCipherIOExceptionpublic String getProvider()
public void init(int mode,
byte[] iv,
byte[] keydata)
throws IOException
SshCipherinit in class SshCiphermode - the mode to operateiv - the initiaization vectorkeydata - the key dataIOExceptionpublic int getBlockSize()
SshCiphergetBlockSize in class SshCipherCopyright © 2014. All rights reserved.