Top Description Inners Fields Constructors Methods
org.bouncycastle.operator

public Class ScryptConfig

extends PBKDFConfig
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1ObjectIdentifier, org.bouncycastle.asn1.misc.MiscObjectIdentifiers

Configuration class for a PBKDF based around scrypt.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int
private final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
public int
public int
public int
Inherited from org.bouncycastle.operator.PBKDFConfig:
getAlgorithm

Field Detail

blockSizeback to summary
private final int blockSize
costParameterback to summary
private final int costParameter
parallelizationParameterback to summary
private final int parallelizationParameter
saltLengthback to summary
private final int saltLength

Constructor Detail

ScryptConfigback to summary
private ScryptConfig(ScryptConfig.Builder builder)

Method Detail

getBlockSizeback to summary
public int getBlockSize()
getCostParameterback to summary
public int getCostParameter()
getParallelizationParameterback to summary
public int getParallelizationParameter()
getSaltLengthback to summary
public int getSaltLength()
org.bouncycastle.operator back to summary

public Class ScryptConfig.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int
private int

Constructor Summary

AccessConstructor and Description
public
Builder(int
cost parameter (must be a power of 2)
costParameter
,
int
block size
blockSize
,
int
parallelization parameter
parallelizationParameter
)

Base constructor.

Method Summary

Modifier and TypeMethod and Description
public ScryptConfig
private static boolean
isPowerOf2(int x)

public ScryptConfig.Builder

Returns:

the current builder.
withSaltLength
(int
the length of the salt (in octets) to use.
saltLength
)

Set the length of the salt to use.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

blockSizeback to summary
private final int blockSize
costParameterback to summary
private final int costParameter
parallelizationParameterback to summary
private final int parallelizationParameter
saltLengthback to summary
private int saltLength

Constructor Detail

Builderback to summary
public Builder(int costParameter, int blockSize, int parallelizationParameter)

Base constructor.

Parameters
costParameter:int

cost parameter (must be a power of 2)

blockSize:int

block size

parallelizationParameter:int

parallelization parameter

Method Detail

buildback to summary
public ScryptConfig build()
isPowerOf2back to summary
private static boolean isPowerOf2(int x)
withSaltLengthback to summary
public ScryptConfig.Builder withSaltLength(int saltLength)

Set the length of the salt to use.

Parameters
saltLength:int

the length of the salt (in octets) to use.

Returns:ScryptConfig.Builder

the current builder.