Package org.bouncycastle.jcajce.spec
Class KTSParameterSpec.Builder
java.lang.Object
org.bouncycastle.jcajce.spec.KTSParameterSpec.Builder
- Enclosing class:
KTSParameterSpec
Builder class for creating a KTSParameterSpec.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the new parameter spec.withKdfAlgorithm
(AlgorithmIdentifier kdfAlgorithm) Set the KDF algorithm and digest algorithm for wrap key generation.Use the shared secret directly for key wrap generation.withParameterSpec
(AlgorithmParameterSpec parameterSpec) Set the algorithm parameter spec to be used with the wrapper.
-
Constructor Details
-
Builder
Basic builder.- Parameters:
algorithmName
- the algorithm name for the secret key we use for wrapping.keySizeInBits
- the size of the wrapping key we want to produce in bits.
-
Builder
Basic builder.- Parameters:
algorithmName
- the algorithm name for the secret key we use for wrapping.keySizeInBits
- the size of the wrapping key we want to produce in bits.otherInfo
- the otherInfo/IV encoding to be applied to the KDF.
-
-
Method Details
-
withParameterSpec
Set the algorithm parameter spec to be used with the wrapper.- Parameters:
parameterSpec
- the algorithm parameter spec to be used in wrapping/unwrapping.- Returns:
- the current Builder instance.
-
withNoKdf
Use the shared secret directly for key wrap generation.- Returns:
- the current Builder instance.
-
withKdfAlgorithm
Set the KDF algorithm and digest algorithm for wrap key generation. The default KDF is X9.44 KDF-3, also known as the NIST concatenation KDF.- Parameters:
kdfAlgorithm
- the KDF algorithm to apply.- Returns:
- the current Builder instance.
-
build
Build the new parameter spec.- Returns:
- a new parameter spec configured according to the builder state.
-