public class BaseCipher extends java.lang.Object implements Cipher
Cipher.Mode| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
algorithm |
protected int |
bsize |
protected javax.crypto.Cipher |
cipher |
protected int |
ivsize |
protected java.lang.String |
transformation |
| Constructor and Description |
|---|
BaseCipher(int ivsize,
int bsize,
java.lang.String algorithm,
java.lang.String transformation) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBlockSize()
Retrieves the block size for this cipher
|
int |
getIVSize()
Retrieves the size of the initialization vector
|
void |
init(Cipher.Mode mode,
byte[] key,
byte[] iv)
Initialize the cipher for encryption or decryption with
the given private key and initialization vector
|
void |
update(byte[] input,
int inputOffset,
int inputLen)
Performs in-place encryption or decryption on the given data.
|
protected final int ivsize
protected final int bsize
protected final java.lang.String algorithm
protected final java.lang.String transformation
protected javax.crypto.Cipher cipher
public BaseCipher(int ivsize,
int bsize,
java.lang.String algorithm,
java.lang.String transformation)
public int getIVSize()
Cipherpublic int getBlockSize()
CiphergetBlockSize in interface Cipherpublic void init(Cipher.Mode mode, byte[] key, byte[] iv) throws java.lang.Exception
CipherCopyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.