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