public static final class KEMExtractSpec.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(java.security.PrivateKey privateKey,
byte[] encapsulation,
java.lang.String keyAlgorithmName,
int keySizeInBits)
Basic builder.
|
Modifier and Type | Method and Description |
---|---|
KEMExtractSpec |
build()
Build the new parameter spec.
|
KEMExtractSpec.Builder |
withKdfAlgorithm(AlgorithmIdentifier kdfAlgorithm)
Set the KDF algorithm and digest algorithm for wrap key generation.
|
KEMExtractSpec.Builder |
withNoKdf()
Use the shared secret directly for key wrap generation.
|
KEMExtractSpec.Builder |
withOtherInfo(byte[] otherInfo)
Set the OtherInfo to use with the KDF.
|
public Builder(java.security.PrivateKey privateKey, byte[] encapsulation, java.lang.String keyAlgorithmName, int keySizeInBits)
privateKey
- the private key to use for the secret extraction.encapsulation
- the encapsulation to process.keyAlgorithmName
- the algorithm name for the secret key we want to generate.keySizeInBits
- the size of the wrapping key we want to produce in bits.public KEMExtractSpec.Builder withNoKdf()
public KEMExtractSpec.Builder withKdfAlgorithm(AlgorithmIdentifier kdfAlgorithm)
kdfAlgorithm
- the KDF algorithm to apply.public KEMExtractSpec.Builder withOtherInfo(byte[] otherInfo)
otherInfo
- the other info to use.public KEMExtractSpec build()