public class BaseCipher extends Object implements Cipher
Cipher.Mode| Modifier and Type | Field and Description |
|---|---|
protected String |
algorithm |
protected int |
bsize |
protected Cipher |
cipher |
protected int |
ivsize |
protected String |
transformation |
| Constructor and Description |
|---|
BaseCipher(int ivsize,
int bsize,
String algorithm,
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
|
protected static byte[] |
resize(byte[] data,
int size) |
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 String algorithm
protected final String transformation
protected Cipher cipher
public int getIVSize()
Cipherpublic int getBlockSize()
CiphergetBlockSize in interface Cipherpublic void init(Cipher.Mode mode, byte[] key, byte[] iv) throws Exception
Cipherpublic void update(byte[] input,
int inputOffset,
int inputLen)
throws Exception
Cipherprotected static byte[] resize(byte[] data,
int size)
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.