public static class TwoStepKDFParameterSpec.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(TwoStepKDFParameterSpec.KDFMode kdfMode)
Construct parameters for HKDF, specifying both the optional salt and
optional info.
|
Builder(TwoStepKDFParameterSpec.KDFMode kdfMode,
int r)
Construct parameters for TwoStepKDF using Counter mode, specifying both the optional salt and
optional info (default location position of After Iteration Data is used).
|
Modifier and Type | Method and Description |
---|---|
TwoStepKDFParameterSpec |
build() |
TwoStepKDFParameterSpec.Builder |
withCounterLocation(TwoStepKDFParameterSpec.CounterLocation location)
Specify the counter location.
|
TwoStepKDFParameterSpec.Builder |
withInfo(byte[] info)
Specify the optional fixed info.
|
TwoStepKDFParameterSpec.Builder |
withIV(byte[] iv)
Specify the optional fixed info.
|
TwoStepKDFParameterSpec.Builder |
withSalt(byte[] salt)
Specify the optional salt.
|
public Builder(TwoStepKDFParameterSpec.KDFMode kdfMode)
kdfMode
- the KDF mode to use.public Builder(TwoStepKDFParameterSpec.KDFMode kdfMode, int r)
kdfMode
- the KDF mode to use.r
- the bit length of the counter to use.public TwoStepKDFParameterSpec.Builder withSalt(byte[] salt)
salt
- the salt to use, may be null for a salt for hashLen zeros.public TwoStepKDFParameterSpec.Builder withInfo(byte[] info)
info
- the info to use, may be null for an info field of zero bytes.public TwoStepKDFParameterSpec.Builder withIV(byte[] iv)
iv
- the info to use, may be null for an info field of zero bytes.public TwoStepKDFParameterSpec.Builder withCounterLocation(TwoStepKDFParameterSpec.CounterLocation location)
location
- the info to use, may be null for an info field of zero bytes.public TwoStepKDFParameterSpec build()