| java.lang.Object org.bouncycastle.crypto.PBEParametersGenerator
All known Subclasses: org.bouncycastle.crypto.generators.OpenSSLPBEParametersGenerator, org.bouncycastle.crypto.generators.PKCS5S2ParametersGenerator, org.bouncycastle.crypto.generators.PKCS5S1ParametersGenerator, org.bouncycastle.jce.provider.OldPKCS12ParametersGenerator, org.bouncycastle.crypto.generators.PKCS12ParametersGenerator,
PBEParametersGenerator | abstract public class PBEParametersGenerator (Code) | | super class for all Password Based Encryption (PBE) parameter generator classes.
|
Method Summary | |
public 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).
Parameters: password - a character array representing the password. | public static byte[] | PKCS5PasswordToBytes(char[] password) converts a password to a byte array according to the scheme in
PKCS5 (ascii, no padding)
Parameters: password - a character array reqpresenting the password. | abstract public CipherParameters | generateDerivedMacParameters(int keySize) generate derived parameters for a key of length keySize, specifically
for use with a MAC.
Parameters: keySize - the length, in bits, of the key required. | abstract public CipherParameters | generateDerivedParameters(int keySize) generate derived parameters for a key of length keySize.
Parameters: keySize - the length, in bits, of the key required. | abstract public CipherParameters | generateDerivedParameters(int keySize, int ivSize) generate derived parameters for a key of length keySize, and
an initialisation vector (IV) of length ivSize.
Parameters: keySize - the length, in bits, of the key required. Parameters: ivSize - the length, in bits, of the iv required. | public int | getIterationCount() return the iteration count. | public byte[] | getPassword() return the password byte array. | public byte[] | getSalt() return the salt byte array. | public void | init(byte[] password, byte[] salt, int iterationCount) initialise the PBE generator. |
iterationCount | protected int iterationCount(Code) | | |
password | protected byte[] password(Code) | | |
salt | protected byte[] salt(Code) | | |
PBEParametersGenerator | protected PBEParametersGenerator()(Code) | | base constructor.
|
PKCS12PasswordToBytes | public static byte[] PKCS12PasswordToBytes(char[] password)(Code) | | converts a password to a byte array according to the scheme in
PKCS12 (unicode, big endian, 2 zero pad bytes at the end).
Parameters: password - a character array representing the password. a byte array representing the password. |
PKCS5PasswordToBytes | public static byte[] PKCS5PasswordToBytes(char[] password)(Code) | | converts a password to a byte array according to the scheme in
PKCS5 (ascii, no padding)
Parameters: password - a character array reqpresenting the password. a byte array representing the password. |
generateDerivedMacParameters | abstract public CipherParameters generateDerivedMacParameters(int keySize)(Code) | | generate derived parameters for a key of length keySize, specifically
for use with a MAC.
Parameters: keySize - the length, in bits, of the key required. a parameters object representing a key. |
generateDerivedParameters | abstract public CipherParameters generateDerivedParameters(int keySize)(Code) | | generate derived parameters for a key of length keySize.
Parameters: keySize - the length, in bits, of the key required. a parameters object representing a key. |
generateDerivedParameters | abstract public CipherParameters generateDerivedParameters(int keySize, int ivSize)(Code) | | generate derived parameters for a key of length keySize, and
an initialisation vector (IV) of length ivSize.
Parameters: keySize - the length, in bits, of the key required. Parameters: ivSize - the length, in bits, of the iv required. a parameters object representing a key and an IV. |
getIterationCount | public int getIterationCount()(Code) | | return the iteration count.
the iteration count. |
getPassword | public byte[] getPassword()(Code) | | return the password byte array.
the password byte array. |
getSalt | public byte[] getSalt()(Code) | | return the salt byte array.
the salt byte array. |
init | public void init(byte[] password, byte[] salt, int iterationCount)(Code) | | initialise the PBE generator.
Parameters: password - the password converted into bytes (see below). Parameters: salt - the salt to be mixed with the password. Parameters: iterationCount - the number of iterations the "mixing" functionis to be applied for. |
|
|