public class PKCS5PBKD2Parameters extends java.lang.Object implements Parameters
Modifier and Type | Class and Description |
---|---|
static interface |
PKCS5PBKD2Parameters.PseudoRandomFunctionType
This interface defines the available pseudo-random function types as defined by PKCS#11:
CKP_PKCS5_PBKD2_HMAC_SHA1.
|
static interface |
PKCS5PBKD2Parameters.SaltSourceType
This interface defines the available sources of the salt value as defined by PKCS#11:
CKZ_SALT_SPECIFIED.
|
Modifier and Type | Field and Description |
---|---|
protected long |
iterations_
The number of iterations to perform when generating each block of random data.
|
protected long |
pseudoRandomFunction_
The pseudo-random function (PRF) to used to generate the key.
|
protected byte[] |
pseudoRandomFunctionData_
The data used as the input for PRF in addition to the salt value.
|
protected long |
saltSource_
The source of the salt value.
|
protected byte[] |
saltSourceData_
The data used as the input for the salt source.
|
Constructor and Description |
---|
PKCS5PBKD2Parameters(long saltSource,
byte[] saltSourceData,
long iterations,
long pseudoRandomFunction,
byte[] pseudoRandomFunctionData)
Create a new PBEDeriveParameters object with the given attributes.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Create a (deep) clone of this object.
|
boolean |
equals(java.lang.Object otherObject)
Compares all member variables of this object with the other object.
|
long |
getIterations()
Get the number of iterations to perform when generating each block of random data.
|
java.lang.Object |
getPKCS11ParamsObject()
Get this parameters object as an object of the CK_PKCS5_PBKD2_PARAMS class.
|
long |
getPseudoRandomFunction()
Get the pseudo-random function (PRF) to used to generate the key.
|
byte[] |
getPseudoRandomFunctionData()
Get the data used as the input for PRF in addition to the salt value.
|
long |
getSaltSource()
Get the source of the salt value.
|
byte[] |
getSaltSourceData()
Get the data used as the input for the salt source.
|
int |
hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a
hashtable.
|
void |
setIterations(long iterations)
Set the number of iterations to perform when generating each block of random data.
|
void |
setPseudoRandomFunction(long pseudoRandomFunction)
Set the pseudo-random function (PRF) to used to generate the key.
|
void |
setPseudoRandomFunctionData(byte[] pseudoRandomFunctionData)
Set the data used as the input for PRF in addition to the salt value.
|
void |
setSaltSource(long saltSource)
Set the source of the salt value.
|
void |
setSaltSourceData(byte[] saltSourceData)
Set the data used as the input for the salt source.
|
java.lang.String |
toString()
Returns the string representation of this object.
|
protected long saltSource_
protected byte[] saltSourceData_
protected long iterations_
protected long pseudoRandomFunction_
protected byte[] pseudoRandomFunctionData_
public PKCS5PBKD2Parameters(long saltSource, byte[] saltSourceData, long iterations, long pseudoRandomFunction, byte[] pseudoRandomFunctionData)
saltSource
- The source of the salt value. One of the constants defined in the SaltSourceType
interface.saltSourceData
- The data used as the input for the salt source.iterations
- The number of iterations to perform when generating each block of random data.pseudoRandomFunction
- The pseudo-random function (PRF) to used to generate the key. One of the constants
defined in the PseudoRandomFunctionType interface.pseudoRandomFunctionData
- The data used as the input for PRF in addition to the salt value.public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.Object getPKCS11ParamsObject()
getPKCS11ParamsObject
in interface Parameters
public long getSaltSource()
public byte[] getSaltSourceData()
public long getIterations()
public long getPseudoRandomFunction()
public byte[] getPseudoRandomFunctionData()
public void setSaltSource(long saltSource)
saltSource
- The source of the salt value. One of the constants defined in the SaltSourceType
interfacepublic void setSaltSourceData(byte[] saltSourceData)
saltSourceData
- The data used as the input for the salt source.public void setIterations(long iterations)
iterations
- The number of iterations to perform when generating each block of random data.public void setPseudoRandomFunction(long pseudoRandomFunction)
pseudoRandomFunction
- The pseudo-random function (PRF) to used to generate the key. One of the constants
defined in the PseudoRandomFunctionType interface.public void setPseudoRandomFunctionData(byte[] pseudoRandomFunctionData)
pseudoRandomFunctionData
- The data used as the input for PRF in addition to the salt value.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
otherObject
- The other object to compare to.public int hashCode()
hashCode
in class java.lang.Object
IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. version 1.6.9