public class BaseCipher extends Object implements Cipher
Cipher.Mode| Constructor and Description |
|---|
BaseCipher(int ivsize,
int kdfSize,
String algorithm,
int keySize,
String transformation,
int blkSize) |
| Modifier and Type | Method and Description |
|---|---|
protected Cipher |
createCipherInstance(Cipher.Mode mode,
byte[] key,
byte[] iv) |
String |
getAlgorithm() |
int |
getCipherBlockSize() |
protected Cipher |
getCipherInstance() |
int |
getIVSize() |
int |
getKdfSize() |
int |
getKeySize() |
String |
getTransformation() |
void |
init(Cipher.Mode mode,
byte[] key,
byte[] iv)
Initialize the cipher for encryption or decryption with the given key and initialization vector
|
protected byte[] |
initializeIVData(Cipher.Mode mode,
byte[] iv,
int reqLen) |
protected byte[] |
initializeKeyData(Cipher.Mode mode,
byte[] key,
int reqLen) |
protected static byte[] |
resize(byte[] data,
int size) |
String |
toString() |
void |
update(byte[] input,
int inputOffset,
int inputLen)
Performs in-place encryption or decryption on the given data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckSupported, updatepublic String getAlgorithm()
getAlgorithm in interface AlgorithmNameProviderpublic int getKeySize()
getKeySize in interface KeySizeIndicatorpublic String getTransformation()
getTransformation in interface CipherInformationpublic int getIVSize()
getIVSize in interface CipherInformationpublic int getKdfSize()
getKdfSize in interface CipherInformationpublic int getCipherBlockSize()
getCipherBlockSize in interface CipherInformationpublic void init(Cipher.Mode mode, byte[] key, byte[] iv) throws Exception
Cipherprotected Cipher getCipherInstance()
protected Cipher createCipherInstance(Cipher.Mode mode, byte[] key, byte[] iv) throws Exception
Exceptionprotected byte[] initializeKeyData(Cipher.Mode mode, byte[] key, int reqLen)
protected byte[] initializeIVData(Cipher.Mode mode, byte[] iv, int reqLen)
public void update(byte[] input,
int inputOffset,
int inputLen)
throws Exception
Cipherprotected static byte[] resize(byte[] data,
int size)
Copyright © 2018–2020 The Apache Software Foundation. All rights reserved.