Package org.bouncycastle.jcajce.spec
Class TwoStepKDFParameterSpec.Builder
java.lang.Object
org.bouncycastle.jcajce.spec.TwoStepKDFParameterSpec.Builder
- Enclosing class:
- TwoStepKDFParameterSpec
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(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). -
Method Summary
-
Constructor Details
-
Builder
Construct parameters for HKDF, specifying both the optional salt and optional info.- Parameters:
kdfMode
- the KDF mode to use.
-
Builder
Construct parameters for TwoStepKDF using Counter mode, specifying both the optional salt and optional info (default location position of After Iteration Data is used).- Parameters:
kdfMode
- the KDF mode to use.r
- the bit length of the counter to use.
-
-
Method Details
-
withSalt
Specify the optional salt.- Parameters:
salt
- the salt to use, may be null for a salt for hashLen zeros.- Returns:
- the adjusted
-
withInfo
Specify the optional fixed info.- Parameters:
info
- the info to use, may be null for an info field of zero bytes.- Returns:
- the adjusted
-
withIV
Specify the optional fixed info.- Parameters:
iv
- the info to use, may be null for an info field of zero bytes.- Returns:
- the adjusted
-
withCounterLocation
public TwoStepKDFParameterSpec.Builder withCounterLocation(TwoStepKDFParameterSpec.CounterLocation location) Specify the counter location.- Parameters:
location
- the info to use, may be null for an info field of zero bytes.- Returns:
- the adjusted
-
build
-