public class PBKDF2ParameterSpec
extends javax.crypto.spec.PBEParameterSpec
Constructor and Description |
---|
PBKDF2ParameterSpec(byte[] salt,
int iterationCount,
int keySize)
Base constructor with the default PRF.
|
PBKDF2ParameterSpec(byte[] salt,
int iterationCount,
int keySize,
AlgorithmIdentifier prf)
Constructor that allows specifying a PRF.
|
PBKDF2ParameterSpec(byte[] salt,
int iterationCount,
int keySize,
DigestAlgorithm prfAlgorithm)
Constructor that allows specifying a PRF using an Algorithm.
|
Modifier and Type | Method and Description |
---|---|
int |
getKeySize()
Return the key size (in bits) for the key to be derived.
|
AlgorithmIdentifier |
getPrf()
Return an AlgorithmIdentifier representing the PRF.
|
boolean |
isDefaultPrf()
Return true if this spec is for the default PRF (HmacSHA1), false otherwise.
|
public PBKDF2ParameterSpec(byte[] salt, int iterationCount, int keySize)
salt
- salt to use.iterationCount
- iteration count for PBE algorithm.keySize
- keySize in bits.public PBKDF2ParameterSpec(byte[] salt, int iterationCount, int keySize, DigestAlgorithm prfAlgorithm)
salt
- salt to use.iterationCount
- iteration count for PBE algorithm.keySize
- keySize in bits.prfAlgorithm
- Algorithm identifying the PRF to use.public PBKDF2ParameterSpec(byte[] salt, int iterationCount, int keySize, AlgorithmIdentifier prf)
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 int getKeySize()
public AlgorithmIdentifier getPrf()