public class PBKDF2KeySpec
extends javax.crypto.spec.PBEKeySpec
Constructor and Description |
---|
PBKDF2KeySpec(char[] password,
byte[] salt,
int iterationCount,
int keySize)
Base constructor with the default PRF.
|
PBKDF2KeySpec(char[] password,
byte[] salt,
int iterationCount,
int keySize,
AlgorithmIdentifier prf)
Constructor that allows specifying a PRF.
|
PBKDF2KeySpec(char[] password,
byte[] salt,
int iterationCount,
int keySize,
DigestAlgorithm prfAlgorithm)
Constructor that allows specifying a PRF using an Algorithm.
|
Modifier and Type | Method and Description |
---|---|
AlgorithmIdentifier |
getPrf()
Return an AlgorithmIdentifier representing the PRF.
|
boolean |
isDefaultPrf()
Return true if this spec is for the default PRF (HmacSHA1), false otherwise.
|
public PBKDF2KeySpec(char[] password, byte[] salt, int iterationCount, int keySize)
password
- password.salt
- salt to use.iterationCount
- iteration count for PBE algorithm.keySize
- keySize in bits.public PBKDF2KeySpec(char[] password, byte[] salt, int iterationCount, int keySize, DigestAlgorithm prfAlgorithm)
password
- password.salt
- salt to use.iterationCount
- iteration count for PBE algorithm.keySize
- keySize in bits.prfAlgorithm
- Algorithm identifying the PRF to use.public PBKDF2KeySpec(char[] password, byte[] salt, int iterationCount, int keySize, AlgorithmIdentifier prf)
password
- password.salt
- salt to use.iterationCount
- iteration count for PBE algorithm.keySize
- keySize in bits.prf
- AlgorithmIdentifier for the PRF to use.public boolean isDefaultPrf()
public AlgorithmIdentifier getPrf()