java.lang.Object
cryptix.jce.provider.cipher.Mode
- Direct Known Subclasses:
- ModeCBC, ModeCFB, ModeECB, ModeOFB
- abstract class Mode
- extends java.lang.Object
A fully constructed Cipher instance looks like this:
+------------------------------------------+
| CipherSpi (API methods) |
| |
| +--------------------------------------+ |
| | Padding | |
| | | |
| | +----------------------------------+ | |
| | | Mode | | |
| | | | | |
| | | +------------------------------+ | | |
| | | | CipherSpi | | | |
| | | | (blockcipher implementation) | | | |
| | | | | | | |
| | | +------------------------------+ | | |
| | | | | |
| | +----------------------------------+ | |
| | | |
| +--------------------------------------+ |
| |
+------------------------------------------+
- Version:
- $Revision: 1.18 $
Method Summary |
(package private) abstract byte[] |
coreGetIV()
|
(package private) abstract int |
coreGetOutputSize(int inputLen)
|
(package private) abstract java.security.spec.AlgorithmParameterSpec |
coreGetParamSpec()
|
(package private) abstract void |
coreInit(boolean decrypt,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
|
(package private) abstract int |
coreUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
|
protected byte[] |
extractIV(java.security.spec.AlgorithmParameterSpec params)
|
protected byte[] |
generateIV()
|
(package private) int |
getBlockSize()
|
(package private) int |
getBufSize()
|
(package private) static Mode |
getInstance(java.lang.String mode,
BlockCipher cipher)
|
(package private) byte[] |
getIV()
|
(package private) int |
getOutputSize(int inputLen)
|
(package private) java.security.spec.AlgorithmParameterSpec |
getParamSpec()
|
(package private) void |
init(boolean decrypt,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
|
(package private) abstract boolean |
needsPadding()
|
(package private) int |
update(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cipher
protected final BlockCipher cipher
- Underlying block cipher
CIPHER_BLOCK_SIZE
protected final int CIPHER_BLOCK_SIZE
- Block size of underlying cipher
decrypt
protected boolean decrypt
- Decrypting?
bufCount
protected int bufCount
- How many bytes the buffer holds
Mode
Mode(BlockCipher cipher)
getInstance
static Mode getInstance(java.lang.String mode,
BlockCipher cipher)
throws java.security.NoSuchAlgorithmException
init
void init(boolean decrypt,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidKeyException,
java.security.InvalidAlgorithmParameterException
getIV
final byte[] getIV()
getParamSpec
final java.security.spec.AlgorithmParameterSpec getParamSpec()
getOutputSize
final int getOutputSize(int inputLen)
getBlockSize
final int getBlockSize()
update
final int update(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
getBufSize
final int getBufSize()
generateIV
protected byte[] generateIV()
extractIV
protected final byte[] extractIV(java.security.spec.AlgorithmParameterSpec params)
throws java.security.InvalidAlgorithmParameterException
coreGetOutputSize
abstract int coreGetOutputSize(int inputLen)
coreInit
abstract void coreInit(boolean decrypt,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidKeyException,
java.security.InvalidAlgorithmParameterException
coreUpdate
abstract int coreUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
coreGetIV
abstract byte[] coreGetIV()
coreGetParamSpec
abstract java.security.spec.AlgorithmParameterSpec coreGetParamSpec()
needsPadding
abstract boolean needsPadding()