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()
Cipher
public int getBlockSize()
Cipher
getBlockSize
in interface Cipher
public void init(Cipher.Mode mode, byte[] key, byte[] iv) throws Exception
Cipher
public void update(byte[] input, int inputOffset, int inputLen) throws Exception
Cipher
protected static byte[] resize(byte[] data, int size)
Copyright © 2008–2018 The Apache Software Foundation. All rights reserved.