Top Description Fields Constructors Methods
org.bouncycastle.asn1.misc

public Class ScryptParams

extends ASN1Object
Class Inheritance
Imports
java.math.BigInteger, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .DEROctetString, .DERSequence, org.bouncycastle.util.Arrays

RFC 7914 scrypt parameters.
scrypt-params ::= SEQUENCE {
     salt OCTET STRING,
     costParameter INTEGER (1..MAX),
     blockSize INTEGER (1..MAX),
     parallelizationParameter INTEGER (1..MAX),
     keyLength INTEGER (1..MAX) OPTIONAL
}

Field Summary

Modifier and TypeField and Description
private final BigInteger
private final BigInteger
private final BigInteger
private final BigInteger
private final byte[]

Constructor Summary

AccessConstructor and Description
public
ScryptParams(byte[] salt, int costParameter, int blockSize, int parallelizationParameter)

public
ScryptParams(byte[] salt, int costParameter, int blockSize, int parallelizationParameter, int keyLength)

public
ScryptParams(byte[]
salt value
salt
,
BigInteger
specifies the CPU/Memory cost parameter N
costParameter
,
BigInteger
block size parameter r
blockSize
,
BigInteger
parallelization parameter
parallelizationParameter
,
BigInteger
length of key to be derived (in octects)
keyLength
)

Base constructor.

private

Method Summary

Modifier and TypeMethod and Description
public BigInteger
public BigInteger
public static ScryptParams
public BigInteger

Returns:

length for key to be derived (in octets)
getKeyLength
()

Return the length in octets for the derived key.

public BigInteger
public byte[]
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

blockSizeback to summary
private final BigInteger blockSize
costParameterback to summary
private final BigInteger costParameter
keyLengthback to summary
private final BigInteger keyLength
parallelizationParameterback to summary
private final BigInteger parallelizationParameter
saltback to summary
private final byte[] salt

Constructor Detail

ScryptParamsback to summary
public ScryptParams(byte[] salt, int costParameter, int blockSize, int parallelizationParameter)
ScryptParamsback to summary
public ScryptParams(byte[] salt, int costParameter, int blockSize, int parallelizationParameter, int keyLength)
ScryptParamsback to summary
public ScryptParams(byte[] salt, BigInteger costParameter, BigInteger blockSize, BigInteger parallelizationParameter, BigInteger keyLength)

Base constructor.

Parameters
salt:byte[]

salt value

costParameter:BigInteger

specifies the CPU/Memory cost parameter N

blockSize:BigInteger

block size parameter r

parallelizationParameter:BigInteger

parallelization parameter

keyLength:BigInteger

length of key to be derived (in octects)

ScryptParamsback to summary
private ScryptParams(ASN1Sequence seq)

Method Detail

getBlockSizeback to summary
public BigInteger getBlockSize()
getCostParameterback to summary
public BigInteger getCostParameter()
getInstanceback to summary
public static ScryptParams getInstance(Object o)
getKeyLengthback to summary
public BigInteger getKeyLength()

Return the length in octets for the derived key.

Returns:BigInteger

length for key to be derived (in octets)

getParallelizationParameterback to summary
public BigInteger getParallelizationParameter()
getSaltback to summary
public byte[] getSalt()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Method providing a primitive representation of this object suitable for encoding.

Returns:ASN1Primitive

a primitive representation of this object.