Top Description Fields Constructors Methods
org.bouncycastle.jcajce

public Class PBKDF2KeyWithParameters

extends PBKDF2Key
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.crypto.CharToByteConverter, org.bouncycastle.util.Arrays

A password based key for use with PBKDF2 as defined in PKCS#5 with full PBE parameters.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
PBKDF2KeyWithParameters(char[]
password to use.
password
,
CharToByteConverter
converter to use for transforming characters into bytes.
converter
,
byte[]
salt for generation algorithm
salt
,
int
iteration count for generation algorithm.
iterationCount
)

Basic constructor for a password based key with generation parameters using FIPS PBKDF.

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.PBKDF2Key:
getAlgorithmgetEncodedgetFormatgetPassword

Field Detail

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

Constructor Detail

PBKDF2KeyWithParametersback to summary
public PBKDF2KeyWithParameters(char[] password, CharToByteConverter converter, byte[] salt, int iterationCount)

Basic constructor for a password based key with generation parameters using FIPS PBKDF.

Parameters
password:char[]

password to use.

converter:CharToByteConverter

converter to use for transforming characters into 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.