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() |
int |
getIVSize() |
void |
init(Cipher.Mode mode,
byte[] key,
byte[] iv)
Initialize the cipher for encryption or decryption with
the given key and initialization vector
|
protected static byte[] |
resize(byte[] data,
int size) |
String |
toString() |
void |
update(byte[] input)
Performs in-place encryption or decryption on the given data.
|
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()
public int getBlockSize()
getBlockSize in interface Cipherpublic void init(Cipher.Mode mode, byte[] key, byte[] iv) throws Exception
Cipherpublic void update(byte[] input)
throws Exception
Cipherupdate in interface Cipherinput - The input/output bytesException - If failed to executeCipher.update(byte[], int, int)public 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.