Package org.apache.commons.crypto.cipher
Class AbstractOpenSslFeedbackCipher
java.lang.Object
org.apache.commons.crypto.cipher.AbstractOpenSslFeedbackCipher
- Direct Known Subclasses:
OpenSslCommonMode
,OpenSslGaloisCounterMode
This class represents a block cipher in one of its modes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int
protected int
protected long
protected final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
clean()
(package private) abstract int
doFinal
(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) (package private) abstract int
doFinal
(ByteBuffer input, ByteBuffer output) (package private) abstract void
init
(int mode, byte[] key, AlgorithmParameterSpec params) (package private) abstract int
update
(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) (package private) abstract int
update
(ByteBuffer input, ByteBuffer output) (package private) abstract void
updateAAD
(byte[] aad)
-
Field Details
-
context
protected long context -
algorithmMode
protected final int algorithmMode -
padding
protected final int padding -
cipherMode
protected int cipherMode
-
-
Constructor Details
-
AbstractOpenSslFeedbackCipher
AbstractOpenSslFeedbackCipher(long context, int algorithmMode, int padding)
-
-
Method Details
-
checkState
public void checkState() -
clean
public void clean() -
doFinal
abstract int doFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException -
doFinal
abstract int doFinal(ByteBuffer input, ByteBuffer output) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException -
init
abstract void init(int mode, byte[] key, AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException -
update
abstract int update(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException - Throws:
ShortBufferException
-
update
- Throws:
ShortBufferException
-
updateAAD
abstract void updateAAD(byte[] aad)
-