1
package javax.crypto.spec;
3
import java.security.spec.AlgorithmParameterSpec;
6
* This class specifies the set of parameters used with password-based encryption (PBE), as defined in the
7
* <a href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-5.html">PKCS #5</a> standard.
9
public class PBEParameterSpec
10
implements AlgorithmParameterSpec
13
private int iterationCount;
16
* Constructs a parameter set for password-based encryption as defined in
17
* the PKCS #5 standard.
19
* @param salt the salt.
20
* @param iterationCount the iteration count.
22
public PBEParameterSpec(
26
this.salt = new byte[salt.length];
27
System.arraycopy(salt, 0, this.salt, 0, salt.length);
29
this.iterationCount = iterationCount;
37
public byte[] getSalt()
39
byte[] tmp = new byte[salt.length];
41
System.arraycopy(salt, 0, tmp, 0, salt.length);
47
* Returns the iteration count.
49
* @return the iteration count
51
public int getIterationCount()
53
return iterationCount;