org.bouncycastle.jce.provider
Class BrokenPBE.Util

java.lang.Object
  extended by org.bouncycastle.jce.provider.BrokenPBE.Util
Enclosing interface:
BrokenPBE

public static class BrokenPBE.Util
extends java.lang.Object

uses the appropriate mixer to generate the key and IV if neccessary.


Constructor Summary
BrokenPBE.Util()
           
 
Method Summary
private static PBEParametersGenerator makePBEGenerator(int type, int hash)
           
(package private) static CipherParameters makePBEMacParameters(JCEPBEKey pbeKey, java.security.spec.AlgorithmParameterSpec spec, int type, int hash, int keySize)
          generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater.
(package private) static CipherParameters makePBEParameters(JCEPBEKey pbeKey, java.security.spec.AlgorithmParameterSpec spec, int type, int hash, java.lang.String targetAlgorithm, int keySize, int ivSize)
          construct a key and iv (if neccessary) suitable for use with a Cipher.
private static void setOddParity(byte[] bytes)
          a faulty parity routine...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokenPBE.Util

public BrokenPBE.Util()
Method Detail

setOddParity

private static void setOddParity(byte[] bytes)
a faulty parity routine...

Parameters:
bytes - the byte array to set the parity on.

makePBEGenerator

private static PBEParametersGenerator makePBEGenerator(int type,
                                                       int hash)

makePBEParameters

static CipherParameters makePBEParameters(JCEPBEKey pbeKey,
                                          java.security.spec.AlgorithmParameterSpec spec,
                                          int type,
                                          int hash,
                                          java.lang.String targetAlgorithm,
                                          int keySize,
                                          int ivSize)
construct a key and iv (if neccessary) suitable for use with a Cipher.


makePBEMacParameters

static CipherParameters makePBEMacParameters(JCEPBEKey pbeKey,
                                             java.security.spec.AlgorithmParameterSpec spec,
                                             int type,
                                             int hash,
                                             int keySize)
generate a PBE based key suitable for a MAC algorithm, the key size is chosen according the MAC size, or the hashing algorithm, whichever is greater.