Package org.bouncycastle.crypto.fips
Class Scrypt.ParametersBuilder
- java.lang.Object
-
- org.bouncycastle.crypto.fips.FipsParameters
-
- org.bouncycastle.crypto.fips.Scrypt.ParametersBuilder
-
- All Implemented Interfaces:
Parameters
- Enclosing class:
- Scrypt
public static final class Scrypt.ParametersBuilder extends FipsParameters
Parameters builder for the scrypt key derivation function.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Scrypt.Parametersusing(byte[] salt, int n, int r, int p, byte[] seed)Generate a key using the scrypt key derivation function.Scrypt.Parametersusing(byte[] salt, int n, int r, int p, PasswordConverter converter, char[] password)Generate a key using the scrypt key derivation function.-
Methods inherited from class org.bouncycastle.crypto.fips.FipsParameters
getAlgorithm
-
-
-
-
Method Detail
-
using
public Scrypt.Parameters using(byte[] salt, int n, int r, int p, byte[] seed)
Generate a key using the scrypt key derivation function.- Parameters:
salt- the salt to use for this invocation.n- CPU/Memory cost parameter. Must be larger than 1, a power of 2 and less than2^(128 * r / 8).r- the block size, must be >= 1.p- Parallelization parameter. Must be a positive integer less than or equal toInteger.MAX_VALUE / (128 * r * 8).seed- the value feed into the PBKDF2 function.- Returns:
- the generated key.
-
using
public Scrypt.Parameters using(byte[] salt, int n, int r, int p, PasswordConverter converter, char[] password)
Generate a key using the scrypt key derivation function.- Parameters:
salt- the salt to use for this invocation.n- CPU/Memory cost parameter. Must be larger than 1, a power of 2 and less than2^(128 * r / 8).r- the block size, must be >= 1.p- Parallelization parameter. Must be a positive integer less than or equal toInteger.MAX_VALUE / (128 * r * 8).converter- a converter to turn the password characters into the byte array for the seed.password- a character string to use as a seed.- Returns:
- the generated key.
-
-