public class PBEKeyAndParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec
Constructor and Description |
---|
PBEKeyAndParameterSpec(byte[] password,
byte[] salt,
int iterationCount,
int derivedKeyLength)
Constructs a parameter set for password-based encryption for
generating MAC secret keys.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Clears the internal password field.
|
int |
getDerivedKeyLength()
Returns the length (number of bytes) the derived key should have.
|
int |
getIterationCount()
Returns the iteration count.
|
byte[] |
getPassword()
Returns the password.
|
byte[] |
getSalt()
Returns the salt.
|
public PBEKeyAndParameterSpec(byte[] password, byte[] salt, int iterationCount, int derivedKeyLength)
password
- the passwordsalt
- the saltiterationCount
- the iteration countderivedKeyLength
- the length (number of bytes) the derived key should havepublic final int getIterationCount()
public final int getDerivedKeyLength()
public final byte[] getSalt()
public final byte[] getPassword()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable