public class ScryptParameters extends KeyDerivationFunctionParameters
Constructor and Description |
---|
ScryptParameters()
Initialize all parameters to default values, using a random salt, a cost parameter of ,
a parallelization parameter of
and a block size of .
|
ScryptParameters(int keySize)
Initialize key size and use a random salt, a cost parameter of ,
a parallelization parameter of
and a block size of .
|
ScryptParameters(int keySize,
byte[] salt)
Initialize parameters to custom values, a cost parameter of , a parallelization parameter
of and a block size of .
|
ScryptParameters(int keySize,
int costParameter,
int parallelizationParameter)
Initialize parameters to custom values, use a random salt and a block size of .
|
ScryptParameters(int keySize,
int costParameter,
int parallelizationParameter,
byte[] salt)
Initialize parameters to custom values and use a block size of .
|
ScryptParameters(int keySize,
int costParameter,
int parallelizationParameter,
int blockSize)
Initialize all parameters to custom values and use a random salt.
|
ScryptParameters(int keySize,
int costParameter,
int parallelizationParameter,
int blockSize,
byte[] salt)
Initialize all parameters to custom values.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithmName() |
int |
getBlockSize() |
int |
getCostParameter() |
int |
getParallelizationParameter() |
byte[] |
getSalt() |
getKeySize
public ScryptParameters()
public ScryptParameters(int keySize)
keySize
- Size of key to be generated in bytes. A negative value means that the key length should be
smartly deducted from the context of use.public ScryptParameters(int keySize, byte[] salt)
keySize
- Size of key to be generated in bytes. A negative value means that the key length should be
smartly deducted from the context of use.salt
- a salt.public ScryptParameters(int keySize, int costParameter, int parallelizationParameter)
keySize
- Size of key to be generated in bytes. A negative value means that the key length should be
smartly deducted from the context of use.costParameter
- CPU/Memory cost parameter, must be larger than 1, a power of 2.parallelizationParameter
- Parallelization parameter, a positive integer less than or equal
to (2^37-32) / 1024public ScryptParameters(int keySize, int costParameter, int parallelizationParameter, byte[] salt)
keySize
- Size of key to be generated in bytes. A negative value means that the key length should be
smartly deducted from the context of use.costParameter
- CPU/Memory cost parameter, must be larger than 1, a power of 2.parallelizationParameter
- Parallelization parameter, a positive integer less than or equal
to (2^37-32) / 1024salt
- a salt.public ScryptParameters(int keySize, int costParameter, int parallelizationParameter, int blockSize)
keySize
- Size of key to be generated in bytes. A negative value means that the key length should be
smartly deducted from the context of use.costParameter
- CPU/Memory cost parameter, must be larger than 1, a power of 2
and less than 2^(16 * blockSize)parallelizationParameter
- Parallelization parameter, a positive integer less than or equal
to (2^37-32) / (128 * blockSize)blockSize
- Block size parameter.public ScryptParameters(int keySize, int costParameter, int parallelizationParameter, int blockSize, byte[] salt)
keySize
- Size of key to be generated in bytes. A negative value means that the key length should be
smartly deducted from the context of use.costParameter
- CPU/Memory cost parameter, must be larger than 1, a power of 2
and less than 2^(16 * blockSize)parallelizationParameter
- Parallelization parameter, a positive integer less than or equal
to (2^37-32) / (128 * blockSize)blockSize
- Block size parameter.salt
- a salt.public String getAlgorithmName()
getAlgorithmName
in class KeyDerivationFunctionParameters
public int getCostParameter()
public int getParallelizationParameter()
public byte[] getSalt()
public int getBlockSize()
Copyright © 2004–2022 XWiki. All rights reserved.