Package org.bouncycastle.asn1.misc
Class ScryptParams
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.misc.ScryptParams
- All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable
,org.bouncycastle.util.Encodable
public class ScryptParams
extends org.bouncycastle.asn1.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
ConstructorDescriptionScryptParams
(byte[] salt, int costParameter, int blockSize, int parallelizationParameter) ScryptParams
(byte[] salt, int costParameter, int blockSize, int parallelizationParameter, int keyLength) ScryptParams
(byte[] salt, BigInteger costParameter, BigInteger blockSize, BigInteger parallelizationParameter, BigInteger keyLength) Base constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ScryptParams
Return the length in octets for the derived key.byte[]
getSalt()
org.bouncycastle.asn1.ASN1Primitive
Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
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, BigInteger costParameter, BigInteger blockSize, BigInteger parallelizationParameter, 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 Details
-
getInstance
-
getSalt
public byte[] getSalt() -
getCostParameter
-
getBlockSize
-
getParallelizationParameter
-
getKeyLength
Return the length in octets for the derived key.- Returns:
- length for key to be derived (in octets)
-
toASN1Primitive
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()- Specified by:
toASN1Primitive
in interfaceorg.bouncycastle.asn1.ASN1Encodable
- Specified by:
toASN1Primitive
in classorg.bouncycastle.asn1.ASN1Object
-