Package javax.crypto.spec
Class PBEParameterSpec
java.lang.Object
javax.crypto.spec.PBEParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
public class PBEParameterSpec extends Object implements AlgorithmParameterSpec
The algorithm parameter specification for a password based encryption
algorithm.
Password based encryption is described in PKCS #5.
-
Constructor Summary
Constructors Constructor Description PBEParameterSpec(byte[] salt, int iterationCount)Creates a newPBEParameterSpecwith the specified salt and iteration count. -
Method Summary
Modifier and Type Method Description intgetIterationCount()Returns the iteration count.byte[]getSalt()Returns a copy to the salt.
-
Constructor Details
-
PBEParameterSpec
public PBEParameterSpec(byte[] salt, int iterationCount)Creates a newPBEParameterSpecwith the specified salt and iteration count.- Parameters:
salt- the salt.iterationCount- the iteration count.- Throws:
NullPointerException- if salt is null.
-
-
Method Details
-
getSalt
public byte[] getSalt()Returns a copy to the salt.- Returns:
- a copy to the salt.
-
getIterationCount
public int getIterationCount()Returns the iteration count.- Returns:
- the iteration count.
-