public class PBKDF2Key extends java.lang.Object implements PBKDFKey
| Constructor and Description |
|---|
PBKDF2Key(char[] password,
CharToByteConverter converter)
Basic constructor for a password based key using PBKDF - secret key generation parameters will be passed separately.
|
PBKDF2Key(char[] password,
CharToByteConverter converter,
AlgorithmIdentifier prf)
Constructor for a password based key using PBKDF2 with a given PRF - secret key generation parameters will be
passed separately.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlgorithm()
Return the password based key derivation function this key is for,
|
byte[] |
getEncoded()
Return the password converted to bytes.
|
java.lang.String |
getFormat()
Return the format encoding.
|
char[] |
getPassword()
Return a reference to the char[] array holding the password.
|
AlgorithmIdentifier |
getPrf()
Return the PRF to use with PBKDF2.
|
public PBKDF2Key(char[] password,
CharToByteConverter converter)
password - password to use.converter - converter to use for turning the password into bytes.public PBKDF2Key(char[] password,
CharToByteConverter converter,
AlgorithmIdentifier prf)
password - password to use.converter - converter to use for turning the password into bytes.prf - the PRF to use with PBKDF2, null if none is specified.public AlgorithmIdentifier getPrf()
public char[] getPassword()
public java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic java.lang.String getFormat()
getFormat in interface java.security.Keypublic byte[] getEncoded()
getEncoded in interface java.security.Key