org.bouncycastle.jce.provider
Class BrokenJCEBlockCipher

java.lang.Object
  extended by org.bouncycastle.jce.provider.BrokenJCEBlockCipher
All Implemented Interfaces:
BrokenPBE
Direct Known Subclasses:
BrokenJCEBlockCipher.BrokePBEWithMD5AndDES, BrokenJCEBlockCipher.BrokePBEWithSHA1AndDES, BrokenJCEBlockCipher.BrokePBEWithSHAAndDES2Key, BrokenJCEBlockCipher.BrokePBEWithSHAAndDES3Key, BrokenJCEBlockCipher.OldPBEWithSHAAndDES3Key, BrokenJCEBlockCipher.OldPBEWithSHAAndTwofish

public class BrokenJCEBlockCipher
extends java.lang.Object
implements BrokenPBE


Nested Class Summary
static class BrokenJCEBlockCipher.BrokePBEWithMD5AndDES
          PBEWithMD5AndDES
static class BrokenJCEBlockCipher.BrokePBEWithSHA1AndDES
          PBEWithSHA1AndDES
static class BrokenJCEBlockCipher.BrokePBEWithSHAAndDES2Key
          PBEWithSHAAnd2-KeyTripleDES-CBC
static class BrokenJCEBlockCipher.BrokePBEWithSHAAndDES3Key
          PBEWithSHAAnd3-KeyTripleDES-CBC
static class BrokenJCEBlockCipher.OldPBEWithSHAAndDES3Key
          OldPBEWithSHAAnd3-KeyTripleDES-CBC
static class BrokenJCEBlockCipher.OldPBEWithSHAAndTwofish
          OldPBEWithSHAAndTwofish-CBC
 
Nested classes/interfaces inherited from interface org.bouncycastle.jce.provider.BrokenPBE
BrokenPBE.Util
 
Field Summary
private  java.lang.Class[] availableSpecs
           
private  BufferedBlockCipher cipher
           
private  java.security.AlgorithmParameters engineParams
           
private  int ivLength
           
private  ParametersWithIV ivParam
           
private  int pbeHash
           
private  int pbeIvSize
           
private  int pbeKeySize
           
private  int pbeType
           
 
Fields inherited from interface org.bouncycastle.jce.provider.BrokenPBE
MD5, OLD_PKCS12, PKCS12, PKCS5S1, PKCS5S2, RIPEMD160, SHA1
 
Constructor Summary
protected BrokenJCEBlockCipher(BlockCipher engine)
           
protected BrokenJCEBlockCipher(BlockCipher engine, int pbeType, int pbeHash, int pbeKeySize, int pbeIvSize)
           
 
Method Summary
protected  byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
           
protected  int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
           
protected  int engineGetBlockSize()
           
protected  byte[] engineGetIV()
           
protected  int engineGetKeySize(java.security.Key key)
           
protected  int engineGetOutputSize(int inputLen)
           
protected  java.security.AlgorithmParameters engineGetParameters()
           
protected  void engineInit(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
           
protected  void engineInit(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random)
           
protected  void engineInit(int opmode, java.security.Key key, java.security.SecureRandom random)
           
protected  void engineSetMode(java.lang.String mode)
           
protected  void engineSetPadding(java.lang.String padding)
           
protected  java.security.Key engineUnwrap(byte[] wrappedKey, java.lang.String wrappedKeyAlgorithm, int wrappedKeyType)
           
protected  byte[] engineUpdate(byte[] input, int inputOffset, int inputLen)
           
protected  int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
           
protected  byte[] engineWrap(java.security.Key key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

availableSpecs

private java.lang.Class[] availableSpecs

cipher

private BufferedBlockCipher cipher

ivParam

private ParametersWithIV ivParam

pbeType

private int pbeType

pbeHash

private int pbeHash

pbeKeySize

private int pbeKeySize

pbeIvSize

private int pbeIvSize

ivLength

private int ivLength

engineParams

private java.security.AlgorithmParameters engineParams
Constructor Detail

BrokenJCEBlockCipher

protected BrokenJCEBlockCipher(BlockCipher engine)

BrokenJCEBlockCipher

protected BrokenJCEBlockCipher(BlockCipher engine,
                               int pbeType,
                               int pbeHash,
                               int pbeKeySize,
                               int pbeIvSize)
Method Detail

engineGetBlockSize

protected int engineGetBlockSize()

engineGetIV

protected byte[] engineGetIV()

engineGetKeySize

protected int engineGetKeySize(java.security.Key key)

engineGetOutputSize

protected int engineGetOutputSize(int inputLen)

engineGetParameters

protected java.security.AlgorithmParameters engineGetParameters()

engineSetMode

protected void engineSetMode(java.lang.String mode)

engineSetPadding

protected void engineSetPadding(java.lang.String padding)
                         throws javax.crypto.NoSuchPaddingException
Throws:
javax.crypto.NoSuchPaddingException

engineInit

protected void engineInit(int opmode,
                          java.security.Key key,
                          java.security.spec.AlgorithmParameterSpec params,
                          java.security.SecureRandom random)
                   throws java.security.InvalidKeyException,
                          java.security.InvalidAlgorithmParameterException
Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException

engineInit

protected void engineInit(int opmode,
                          java.security.Key key,
                          java.security.AlgorithmParameters params,
                          java.security.SecureRandom random)
                   throws java.security.InvalidKeyException,
                          java.security.InvalidAlgorithmParameterException
Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException

engineInit

protected void engineInit(int opmode,
                          java.security.Key key,
                          java.security.SecureRandom random)
                   throws java.security.InvalidKeyException
Throws:
java.security.InvalidKeyException

engineUpdate

protected byte[] engineUpdate(byte[] input,
                              int inputOffset,
                              int inputLen)

engineUpdate

protected int engineUpdate(byte[] input,
                           int inputOffset,
                           int inputLen,
                           byte[] output,
                           int outputOffset)

engineDoFinal

protected byte[] engineDoFinal(byte[] input,
                               int inputOffset,
                               int inputLen)
                        throws javax.crypto.IllegalBlockSizeException,
                               javax.crypto.BadPaddingException
Throws:
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException

engineDoFinal

protected int engineDoFinal(byte[] input,
                            int inputOffset,
                            int inputLen,
                            byte[] output,
                            int outputOffset)
                     throws javax.crypto.IllegalBlockSizeException,
                            javax.crypto.BadPaddingException
Throws:
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException

engineWrap

protected byte[] engineWrap(java.security.Key key)
                     throws javax.crypto.IllegalBlockSizeException,
                            java.security.InvalidKeyException
Throws:
javax.crypto.IllegalBlockSizeException
java.security.InvalidKeyException

engineUnwrap

protected java.security.Key engineUnwrap(byte[] wrappedKey,
                                         java.lang.String wrappedKeyAlgorithm,
                                         int wrappedKeyType)
                                  throws java.security.InvalidKeyException
Throws:
java.security.InvalidKeyException