Package org.bouncycastle.asn1.misc
Class ScryptParams
- java.lang.Object
-
- org.bouncycastle.asn1.ASN1Object
-
- org.bouncycastle.asn1.misc.ScryptParams
-
- All Implemented Interfaces:
ASN1Encodable
,Encodable
public class ScryptParams extends ASN1Object
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 }
-
-
Constructor Summary
Constructors Constructor Description ScryptParams(byte[] salt, int costParameter, int blockSize, int parallelizationParameter)
ScryptParams(byte[] salt, int costParameter, int blockSize, int parallelizationParameter, int keyLength)
ScryptParams(byte[] salt, java.math.BigInteger costParameter, java.math.BigInteger blockSize, java.math.BigInteger parallelizationParameter, java.math.BigInteger keyLength)
Base constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.math.BigInteger
getBlockSize()
java.math.BigInteger
getCostParameter()
static ScryptParams
getInstance(java.lang.Object o)
java.math.BigInteger
getKeyLength()
Return the length in octets for the derived key.java.math.BigInteger
getParallelizationParameter()
byte[]
getSalt()
ASN1Primitive
toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding.-
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
-
-
-
Constructor Detail
-
ScryptParams
public ScryptParams(byte[] salt, int costParameter, int blockSize, int parallelizationParameter)
-
ScryptParams
public ScryptParams(byte[] salt, int costParameter, int blockSize, int parallelizationParameter, int keyLength)
-
ScryptParams
public ScryptParams(byte[] salt, java.math.BigInteger costParameter, java.math.BigInteger blockSize, java.math.BigInteger parallelizationParameter, java.math.BigInteger keyLength)
Base constructor.- Parameters:
salt
- salt valuecostParameter
- specifies the CPU/Memory cost parameter NblockSize
- block size parameter rparallelizationParameter
- parallelization parameterkeyLength
- length of key to be derived (in octects)
-
-
Method Detail
-
getInstance
public static ScryptParams getInstance(java.lang.Object o)
-
getSalt
public byte[] getSalt()
-
getCostParameter
public java.math.BigInteger getCostParameter()
-
getBlockSize
public java.math.BigInteger getBlockSize()
-
getParallelizationParameter
public java.math.BigInteger getParallelizationParameter()
-
getKeyLength
public java.math.BigInteger getKeyLength()
Return the length in octets for the derived key.- Returns:
- length for key to be derived (in octets)
-
toASN1Primitive
public ASN1Primitive toASN1Primitive()
Description copied from class:ASN1Object
Method providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- a primitive representation of this object.
-
-