Class BaseBlockCipher
java.lang.Object
javax.crypto.CipherSpi
org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher
- All Implemented Interfaces:
PBE
- Direct Known Subclasses:
AES.CBC,AES.CBC128,AES.CBC192,AES.CBC256,AES.CCM,AES.CCM128,AES.CCM192,AES.CCM256,AES.CFB,AES.CFB128,AES.CFB192,AES.CFB256,AES.ECB,AES.ECB128,AES.ECB192,AES.ECB256,AES.GCM,AES.GCM128,AES.GCM192,AES.GCM256,AES.OFB,AES.OFB128,AES.OFB192,AES.OFB256,AES.PBEWithAESCBC,AES.PBEWithSHA1AESCBC128,AES.PBEWithSHA1AESCBC192,AES.PBEWithSHA1AESCBC256,AES.PBEWithSHA256AESCBC128,AES.PBEWithSHA256AESCBC192,AES.PBEWithSHA256AESCBC256,ARIA.CBC,ARIA.CCM,ARIA.CFB,ARIA.ECB,ARIA.GCM,ARIA.OFB,Blowfish.CBC,Blowfish.ECB,Camellia.CBC,Camellia.CBC128,Camellia.CBC192,Camellia.CBC256,Camellia.ECB,CAST5.CBC,CAST5.ECB,CAST6.ECB,ChaCha.BaseCC20P1305,DES.CBC,DES.ECB,DES.PBEWithMD2,DES.PBEWithMD5,DES.PBEWithSHA1,DESede.CBC,DESede.ECB,DESede.PBEWithSHAAndDES2Key,DESede.PBEWithSHAAndDES3Key,DSTU7624.CBC128,DSTU7624.CBC256,DSTU7624.CBC512,DSTU7624.CCM128,DSTU7624.CCM256,DSTU7624.CCM512,DSTU7624.CFB128,DSTU7624.CFB256,DSTU7624.CFB512,DSTU7624.CTR128,DSTU7624.CTR256,DSTU7624.CTR512,DSTU7624.ECB,DSTU7624.ECB_128,DSTU7624.ECB_256,DSTU7624.ECB_512,DSTU7624.ECB128,DSTU7624.ECB256,DSTU7624.ECB512,DSTU7624.GCM128,DSTU7624.GCM256,DSTU7624.GCM512,DSTU7624.OFB128,DSTU7624.OFB256,DSTU7624.OFB512,GOST28147.CBC,GOST28147.ECB,GOST28147.GCFB,GOST3412_2015.CBC,GOST3412_2015.CTR,GOST3412_2015.ECB,GOST3412_2015.GCFB,GOST3412_2015.GCFB8,GOST3412_2015.OFB,IDEA.CBC,IDEA.ECB,IDEA.PBEWithSHAAndIDEA,Noekeon.ECB,RC2.CBC,RC2.ECB,RC2.PBEWithMD5AndRC2,RC2.PBEWithSHA1AndRC2,RC2.PBEWithSHAAnd128BitRC2,RC2.PBEWithSHAAnd40BitRC2,RC5.CBC32,RC5.ECB32,RC5.ECB64,RC6.CBC,RC6.CFB,RC6.ECB,RC6.OFB,Rijndael.ECB,SEED.CBC,SEED.ECB,Serpent.CBC,Serpent.CBC128,Serpent.CBC192,Serpent.CBC256,Serpent.CFB,Serpent.CFB128,Serpent.CFB192,Serpent.CFB256,Serpent.ECB,Serpent.ECB128,Serpent.ECB192,Serpent.ECB256,Serpent.OFB,Serpent.OFB128,Serpent.OFB192,Serpent.OFB256,Serpent.TECB,Shacal2.CBC,Shacal2.ECB,Skipjack.ECB,SM4.ECB,TEA.ECB,Threefish.ECB_1024,Threefish.ECB_256,Threefish.ECB_512,Twofish.ECB,Twofish.PBEWithSHA,XTEA.ECB
-
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
ConstructorsModifierConstructorDescriptionprotectedBaseBlockCipher(int keySizeInBits, BlockCipher engine, int ivLength) protectedBaseBlockCipher(int keySizeInBits, BufferedBlockCipher engine, int ivLength) protectedBaseBlockCipher(int keySizeInBits, AEADBlockCipher engine) protectedBaseBlockCipher(int keySizeInBits, AEADBlockCipher engine, boolean fixedIv, int ivLength) protectedBaseBlockCipher(int keySizeInBits, BlockCipherProvider provider) protectedBaseBlockCipher(BlockCipher engine) protectedBaseBlockCipher(BlockCipher engine, boolean fixedIv, int ivLength) protectedBaseBlockCipher(BlockCipher engine, int ivLength) protectedBaseBlockCipher(BlockCipher engine, int scheme, int digest, int keySizeInBits, int ivLength) protectedBaseBlockCipher(BufferedBlockCipher engine, boolean fixedIv, int ivLength) protectedBaseBlockCipher(BufferedBlockCipher engine, int ivLength) protectedBaseBlockCipher(AEADBlockCipher engine) protectedBaseBlockCipher(AEADBlockCipher engine, boolean fixedIv, int ivLength) protectedBaseBlockCipher(AEADCipher engine, boolean fixedIv, int ivLength) protectedBaseBlockCipher(BlockCipherProvider provider) -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]engineDoFinal(byte[] input, int inputOffset, int inputLen) protected intengineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) protected intprotected byte[]protected intengineGetKeySize(Key key) protected intengineGetOutputSize(int inputLen) protected AlgorithmParametersprotected voidengineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) protected voidengineInit(int opmode, Key key, SecureRandom random) protected voidengineInit(int opmode, Key key, AlgorithmParameterSpec paramSpec, SecureRandom random) protected voidengineSetMode(String mode) protected voidengineSetPadding(String padding) protected byte[]engineUpdate(byte[] input, int inputOffset, int inputLen) protected intengineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) protected voidengineUpdateAAD(byte[] input, int offset, int length) protected voidMethods inherited from class org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
createParametersInstance, engineUnwrap, engineWrapMethods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineUpdate
-
Constructor Details
-
BaseBlockCipher
-
BaseBlockCipher
protected BaseBlockCipher(BlockCipher engine, int scheme, int digest, int keySizeInBits, int ivLength) -
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
BaseBlockCipher
-
-
Method Details
-
engineGetBlockSize
protected int engineGetBlockSize()- Overrides:
engineGetBlockSizein classBaseWrapCipher
-
engineGetIV
protected byte[] engineGetIV()- Overrides:
engineGetIVin classBaseWrapCipher
-
engineGetKeySize
- Overrides:
engineGetKeySizein classBaseWrapCipher
-
engineGetOutputSize
protected int engineGetOutputSize(int inputLen) - Overrides:
engineGetOutputSizein classBaseWrapCipher
-
engineGetParameters
- Overrides:
engineGetParametersin classBaseWrapCipher
-
engineSetMode
- Overrides:
engineSetModein classBaseWrapCipher- Throws:
NoSuchAlgorithmException
-
engineSetPadding
- Overrides:
engineSetPaddingin classBaseWrapCipher- Throws:
NoSuchPaddingException
-
engineInit
protected void engineInit(int opmode, Key key, AlgorithmParameterSpec paramSpec, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Overrides:
engineInitin classBaseWrapCipher- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineInit
protected void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException - Overrides:
engineInitin classBaseWrapCipher- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineInit
- Overrides:
engineInitin classBaseWrapCipher- Throws:
InvalidKeyException
-
engineUpdateAAD
protected void engineUpdateAAD(byte[] input, int offset, int length) - Overrides:
engineUpdateAADin classCipherSpi
-
engineUpdateAAD
- Overrides:
engineUpdateAADin classCipherSpi
-
engineUpdate
protected byte[] engineUpdate(byte[] input, int inputOffset, int inputLen) - Overrides:
engineUpdatein classBaseWrapCipher
-
engineUpdate
protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException - Overrides:
engineUpdatein classBaseWrapCipher- Throws:
ShortBufferException
-
engineDoFinal
protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException - Overrides:
engineDoFinalin classBaseWrapCipher- Throws:
IllegalBlockSizeExceptionBadPaddingException
-
engineDoFinal
protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws IllegalBlockSizeException, BadPaddingException, ShortBufferException - Overrides:
engineDoFinalin classBaseWrapCipher- Throws:
IllegalBlockSizeExceptionBadPaddingExceptionShortBufferException
-