Package org.bouncycastle.jcajce
Class PBKDF2Key
java.lang.Object
org.bouncycastle.jcajce.PBKDF2Key
- All Implemented Interfaces:
Serializable
,Key
,SecretKey
,Destroyable
,PBKDFKey
- Direct Known Subclasses:
PBKDF2KeyWithParameters
A password based key for use with PBKDF2 as defined in PKCS#5.
- See Also:
-
Field Summary
Fields inherited from interface javax.crypto.SecretKey
serialVersionUID
-
Constructor Summary
ConstructorsConstructorDescriptionPBKDF2Key
(char[] password, CharToByteConverter converter) Basic constructor for a password based key using PBKDF - secret key generation parameters will be passed separately.. -
Method Summary
Modifier and TypeMethodDescriptionReturn the password based key derivation function this key is for,byte[]
Return the password converted to bytes.Return the format encoding.char[]
Return a reference to the char[] array holding the password.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
PBKDF2Key
Basic constructor for a password based key using PBKDF - secret key generation parameters will be passed separately..- Parameters:
password
- password to use.
-
-
Method Details
-
getPassword
public char[] getPassword()Return a reference to the char[] array holding the password.- Returns:
- a reference to the password array.
-
getAlgorithm
Return the password based key derivation function this key is for,- Specified by:
getAlgorithm
in interfaceKey
- Returns:
- the string "PBKDF2"
-
getFormat
Return the format encoding. -
getEncoded
public byte[] getEncoded()Return the password converted to bytes.- Specified by:
getEncoded
in interfaceKey
- Returns:
- the password converted to a byte array.
-