Top Description Fields Constructors Methods
org.bouncycastle.jcajce

public Class PKCS12KeyWithParameters

extends PKCS12Key
implements PBEKey
Class Inheritance
All Implemented Interfaces
javax.crypto.interfaces.PBEKey, javax.crypto.SecretKey, javax.security.auth.Destroyable, java.security.Key, java.io.Serializable
Imports
javax.crypto.interfaces.PBEKey, org.bouncycastle.util.Arrays

A password based key for use with PKCS#12 with full PBE parameters.

Field Summary

Modifier and TypeField and Description
private final int
private final byte[]

Constructor Summary

AccessConstructor and Description
public
PKCS12KeyWithParameters(char[]
password to use.
password
,
byte[]
salt for generation algorithm
salt
,
int
iteration count for generation algorithm.
iterationCount
)

Basic constructor for a password based key with generation parameters.

public
PKCS12KeyWithParameters(char[]
password to use.
password
,
boolean
use the incorrect encoding approach (add pad bytes)
useWrongZeroLengthConversion
,
byte[]
salt for generation algorithm
salt
,
int
iteration count for generation algorithm.
iterationCount
)

Basic constructor for a password based key with generation parameters, specifying the wrong conversion for zero length passwords.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the iteration count to use in the KDF.
getIterationCount
()

Implements javax.crypto.interfaces.PBEKey.getIterationCount.

Return the iteration count to use in the key derivation function.
public byte[]

Returns:

the salt to use in the KDF.
getSalt
()

Implements javax.crypto.interfaces.PBEKey.getSalt.

Return the salt to use in the key derivation function.
Inherited from org.bouncycastle.jcajce.PKCS12Key:
getAlgorithmgetEncodedgetFormatgetPassword

Field Detail

iterationCountback to summary
private final int iterationCount
saltback to summary
private final byte[] salt

Constructor Detail

PKCS12KeyWithParametersback to summary
public PKCS12KeyWithParameters(char[] password, byte[] salt, int iterationCount)

Basic constructor for a password based key with generation parameters.

Parameters
password:char[]

password to use.

salt:byte[]

salt for generation algorithm

iterationCount:int

iteration count for generation algorithm.

PKCS12KeyWithParametersback to summary
public PKCS12KeyWithParameters(char[] password, boolean useWrongZeroLengthConversion, byte[] salt, int iterationCount)

Basic constructor for a password based key with generation parameters, specifying the wrong conversion for zero length passwords.

Parameters
password:char[]

password to use.

useWrongZeroLengthConversion:boolean

use the incorrect encoding approach (add pad bytes)

salt:byte[]

salt for generation algorithm

iterationCount:int

iteration count for generation algorithm.

Method Detail

getIterationCountback to summary
public int getIterationCount()

Implements javax.crypto.interfaces.PBEKey.getIterationCount.

Return the iteration count to use in the key derivation function.

Returns:int

the iteration count to use in the KDF.

getSaltback to summary
public byte[] getSalt()

Implements javax.crypto.interfaces.PBEKey.getSalt.

Return the salt to use in the key derivation function.

Returns:byte[]

the salt to use in the KDF.