Top Description Fields Constructors Methods
org.bouncycastle.jcajce

public Class PBKDF2Key

extends Object
implements PBKDFKey
Class Inheritance
All Implemented Interfaces
org.bouncycastle.jcajce.PBKDFKey, javax.crypto.SecretKey, javax.security.auth.Destroyable, java.security.Key, java.io.Serializable
Known Direct Subclasses
org.bouncycastle.jcajce.PBKDF2KeyWithParameters
Imports
org.bouncycastle.crypto.CharToByteConverter, org.bouncycastle.util.Arrays

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

Field Summary

Modifier and TypeField and Description
private final CharToByteConverter
private final char[]

Constructor Summary

AccessConstructor and Description
public
PBKDF2Key(char[]
password to use.
password
,
CharToByteConverter converter)

Basic constructor for a password based key using PBKDF - secret key generation parameters will be passed separately..

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the string "PBKDF2"
getAlgorithm
()

Implements java.security.Key.getAlgorithm.

Return the password based key derivation function this key is for,
public byte[]

Returns:

the password converted to a byte array.
getEncoded
()

Implements java.security.Key.getEncoded.

Return the password converted to bytes.
public String

Returns:

the type name representing a char[] to byte[] conversion.
getFormat
()

Implements java.security.Key.getFormat.

Return the format encoding.
public char[]

Returns:

a reference to the password array.
getPassword
()

Return a reference to the char[] array holding the password.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

converterback to summary
private final CharToByteConverter converter
passwordback to summary
private final char[] password

Constructor Detail

PBKDF2Keyback to summary
public PBKDF2Key(char[] password, CharToByteConverter converter)

Basic constructor for a password based key using PBKDF - secret key generation parameters will be passed separately..

Parameters
password:char[]

password to use.

Method Detail

getAlgorithmback to summary
public String getAlgorithm()

Implements java.security.Key.getAlgorithm.

Return the password based key derivation function this key is for,

Returns:String

the string "PBKDF2"

getEncodedback to summary
public byte[] getEncoded()

Implements java.security.Key.getEncoded.

Return the password converted to bytes.

Returns:byte[]

the password converted to a byte array.

getFormatback to summary
public String getFormat()

Implements java.security.Key.getFormat.

Return the format encoding.

Returns:String

the type name representing a char[] to byte[] conversion.

getPasswordback to summary
public char[] getPassword()

Return a reference to the char[] array holding the password.

Returns:char[]

a reference to the password array.