public class PBKDF2Parameters
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
derivedKey
The derived key is actually only a convenience to store a reference
derived key.
|
protected java.lang.String |
hashAlgorithm |
protected java.lang.String |
hashCharset |
protected int |
iterationCount |
protected byte[] |
salt |
| Constructor and Description |
|---|
PBKDF2Parameters()
Constructor.
|
PBKDF2Parameters(java.lang.String hashAlgorithm,
java.lang.String hashCharset,
byte[] salt,
int iterationCount)
Constructor.
|
PBKDF2Parameters(java.lang.String hashAlgorithm,
java.lang.String hashCharset,
byte[] salt,
int iterationCount,
byte[] derivedKey)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getDerivedKey() |
java.lang.String |
getHashAlgorithm() |
java.lang.String |
getHashCharset() |
int |
getIterationCount() |
byte[] |
getSalt() |
void |
setDerivedKey(byte[] derivedKey) |
void |
setHashAlgorithm(java.lang.String hashAlgorithm) |
void |
setHashCharset(java.lang.String hashCharset) |
void |
setIterationCount(int iterationCount) |
void |
setSalt(byte[] salt) |
protected byte[] salt
protected int iterationCount
protected java.lang.String hashAlgorithm
protected java.lang.String hashCharset
protected byte[] derivedKey
public PBKDF2Parameters()
null for byte arrays, UTF-8 as
character set and 1000 for iteration count.public PBKDF2Parameters(java.lang.String hashAlgorithm,
java.lang.String hashCharset,
byte[] salt,
int iterationCount)
hashAlgorithm - for example HMacSHA1 or HMacMD5hashCharset - for example UTF-8salt - Salt as byte array, may be null (not
recommended)iterationCount - Number of iterations to execute. Recommended value 1000.public PBKDF2Parameters(java.lang.String hashAlgorithm,
java.lang.String hashCharset,
byte[] salt,
int iterationCount,
byte[] derivedKey)
hashAlgorithm - for example HMacSHA1 or HMacMD5hashCharset - for example UTF-8salt - Salt as byte array, may be null (not
recommended)iterationCount - Number of iterations to execute. Recommended value 1000.derivedKey - Convenience data holder, not used during computation.public int getIterationCount()
public void setIterationCount(int iterationCount)
public byte[] getSalt()
public void setSalt(byte[] salt)
public byte[] getDerivedKey()
public void setDerivedKey(byte[] derivedKey)
public java.lang.String getHashAlgorithm()
public void setHashAlgorithm(java.lang.String hashAlgorithm)
public java.lang.String getHashCharset()
public void setHashCharset(java.lang.String hashCharset)