| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gudy.bouncycastle.crypto.PBEParametersGenerator
public abstract class PBEParametersGenerator
super class for all Password Based Encyrption (PBE) parameter generator classes.
| Field Summary | |
|---|---|
protected  int | 
iterationCount
 | 
protected  byte[] | 
password
 | 
protected  byte[] | 
salt
 | 
| Constructor Summary | |
|---|---|
protected  | 
PBEParametersGenerator()
base constructor.  | 
| Method Summary | |
|---|---|
abstract  CipherParameters | 
generateDerivedMacParameters(int keySize)
generate derived parameters for a key of length keySize, specifically for use with a MAC.  | 
abstract  CipherParameters | 
generateDerivedParameters(int keySize)
generate derived parameters for a key of length keySize.  | 
abstract  CipherParameters | 
generateDerivedParameters(int keySize,
                          int ivSize)
generate derived parameters for a key of length keySize, and an initialisation vector (IV) of length ivSize.  | 
 int | 
getIterationCount()
return the iteration count.  | 
 byte[] | 
getPassword()
return the password byte array.  | 
 byte[] | 
getSalt()
return the salt byte array.  | 
 void | 
init(byte[] password,
     byte[] salt,
     int iterationCount)
initialise the PBE generator.  | 
static byte[] | 
PKCS12PasswordToBytes(char[] password)
converts a password to a byte array according to the scheme in PKCS12 (unicode, big endian, 2 zero pad bytes at the end).  | 
static byte[] | 
PKCS5PasswordToBytes(char[] password)
converts a password to a byte array according to the scheme in PKCS5 (ascii, no padding)  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected byte[] password
protected byte[] salt
protected int iterationCount
| Constructor Detail | 
|---|
protected PBEParametersGenerator()
| Method Detail | 
|---|
public void init(byte[] password,
                 byte[] salt,
                 int iterationCount)
password - the password converted into bytes (see below).salt - the salt to be mixed with the password.iterationCount - the number of iterations the "mixing" function
 is to be applied for.public byte[] getPassword()
public byte[] getSalt()
public int getIterationCount()
public abstract CipherParameters generateDerivedParameters(int keySize)
keySize - the length, in bits, of the key required.
public abstract CipherParameters generateDerivedParameters(int keySize,
                                                           int ivSize)
keySize - the length, in bits, of the key required.ivSize - the length, in bits, of the iv required.
public abstract CipherParameters generateDerivedMacParameters(int keySize)
keySize - the length, in bits, of the key required.
public static byte[] PKCS5PasswordToBytes(char[] password)
password - a character array reqpresenting the password.
public static byte[] PKCS12PasswordToBytes(char[] password)
password - a character array reqpresenting the password.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||