Class BaseStreamCipher
java.lang.Object
javax.crypto.CipherSpi
org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
org.bouncycastle.jcajce.provider.symmetric.util.BaseStreamCipher
- All Implemented Interfaces:
PBE
- Direct Known Subclasses:
ARC4.Base
,ARC4.PBEWithSHAAnd128Bit
,ARC4.PBEWithSHAAnd40Bit
,ChaCha.Base
,ChaCha.Base7539
,Grain128.Base
,Grainv1.Base
,HC128.Base
,HC256.Base
,Salsa20.Base
,VMPC.Base
,VMPCKSA3.Base
,XSalsa20.Base
,Zuc.Zuc128
,Zuc.Zuc256
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
BaseWrapCipher.ErasableOutputStream, BaseWrapCipher.InvalidKeyOrParametersException
-
Field Summary
Fields inherited from class org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
engineParams, pbeHash, pbeIvSize, pbeKeySize, pbeType, wrapEngine
-
Constructor Summary
ModifierConstructorDescriptionprotected
BaseStreamCipher
(StreamCipher engine, int ivLength) protected
BaseStreamCipher
(StreamCipher engine, int ivLength, int keySizeInBits) protected
BaseStreamCipher
(StreamCipher engine, int ivLength, int keySizeInBits, int digest) -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
engineDoFinal
(byte[] input, int inputOffset, int inputLen) protected int
engineDoFinal
(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) protected int
protected byte[]
protected int
engineGetKeySize
(Key key) protected int
engineGetOutputSize
(int inputLen) protected AlgorithmParameters
protected void
engineInit
(int opmode, Key key, AlgorithmParameters params, SecureRandom random) protected void
engineInit
(int opmode, Key key, SecureRandom random) protected void
engineInit
(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) protected void
engineSetMode
(String mode) should never be called.protected void
engineSetPadding
(String padding) should never be called.protected byte[]
engineUpdate
(byte[] input, int inputOffset, int inputLen) protected int
engineUpdate
(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) Methods inherited from class org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
createParametersInstance, engineUnwrap, engineWrap
Methods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineUpdate, engineUpdateAAD, engineUpdateAAD
-
Constructor Details
-
BaseStreamCipher
-
BaseStreamCipher
-
BaseStreamCipher
-
-
Method Details
-
engineGetBlockSize
protected int engineGetBlockSize()- Overrides:
engineGetBlockSize
in classBaseWrapCipher
-
engineGetIV
protected byte[] engineGetIV()- Overrides:
engineGetIV
in classBaseWrapCipher
-
engineGetKeySize
- Overrides:
engineGetKeySize
in classBaseWrapCipher
-
engineGetOutputSize
protected int engineGetOutputSize(int inputLen) - Overrides:
engineGetOutputSize
in classBaseWrapCipher
-
engineGetParameters
- Overrides:
engineGetParameters
in classBaseWrapCipher
-
engineSetMode
should never be called.- Overrides:
engineSetMode
in classBaseWrapCipher
- Throws:
NoSuchAlgorithmException
-
engineSetPadding
should never be called.- Overrides:
engineSetPadding
in classBaseWrapCipher
- Throws:
NoSuchPaddingException
-
engineInit
protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Overrides:
engineInit
in classBaseWrapCipher
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
-
engineInit
protected void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Overrides:
engineInit
in classBaseWrapCipher
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
-
engineInit
- Overrides:
engineInit
in classBaseWrapCipher
- Throws:
InvalidKeyException
-
engineUpdate
protected byte[] engineUpdate(byte[] input, int inputOffset, int inputLen) - Overrides:
engineUpdate
in classBaseWrapCipher
-
engineUpdate
protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException - Overrides:
engineUpdate
in classBaseWrapCipher
- Throws:
ShortBufferException
-
engineDoFinal
protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) - Overrides:
engineDoFinal
in classBaseWrapCipher
-
engineDoFinal
protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException - Overrides:
engineDoFinal
in classBaseWrapCipher
- Throws:
ShortBufferException
-