public class PBKDF2Parameters extends 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 String |
hashAlgorithm |
protected String |
hashCharset |
protected int |
iterationCount |
protected byte[] |
salt |
Constructor and Description |
---|
PBKDF2Parameters()
Constructor.
|
PBKDF2Parameters(String hashAlgorithm,
String hashCharset,
byte[] salt,
int iterationCount)
Constructor.
|
PBKDF2Parameters(String hashAlgorithm,
String hashCharset,
byte[] salt,
int iterationCount,
byte[] derivedKey)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getDerivedKey() |
String |
getHashAlgorithm() |
String |
getHashCharset() |
int |
getIterationCount() |
byte[] |
getSalt() |
void |
setDerivedKey(byte[] derivedKey) |
void |
setHashAlgorithm(String hashAlgorithm) |
void |
setHashCharset(String hashCharset) |
void |
setIterationCount(int iterationCount) |
void |
setSalt(byte[] salt) |
protected byte[] salt
protected int iterationCount
protected String hashAlgorithm
protected String hashCharset
protected byte[] derivedKey
public PBKDF2Parameters()
null
for byte arrays, UTF-8 as
character set and 1000 for iteration count.public PBKDF2Parameters(String hashAlgorithm, 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(String hashAlgorithm, 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 String getHashAlgorithm()
public void setHashAlgorithm(String hashAlgorithm)
public String getHashCharset()
public void setHashCharset(String hashCharset)
Copyright © 2018 PerimeterX. All rights reserved.