public static final class KTSExtractKeySpec.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder(java.security.PrivateKey privateKey,
byte[] encapsulation,
java.lang.String algorithmName,
int keySizeInBits)
Basic builder.
|
Builder(java.security.PrivateKey privateKey,
byte[] encapsulation,
java.lang.String algorithmName,
int keySizeInBits,
byte[] otherInfo)
Basic builder.
|
| Modifier and Type | Method and Description |
|---|---|
KTSExtractKeySpec |
build()
Build the new key spec.
|
KTSExtractKeySpec.Builder |
withKdfAlgorithm(AlgorithmIdentifier kdfAlgorithm)
Set the KDF algorithm and digest algorithm for key generation (ignored for OAEP).
|
KTSExtractKeySpec.Builder |
withKdfAlgorithm(FipsKDF.AgreementKDFParametersBuilder kdfAlgorithm)
Set the KDF algorithm and digest algorithm for key generation (ignored for OAEP).
|
KTSExtractKeySpec.Builder |
withKdfSalt(byte[] salt)
Set the KDF salt for key generation (ignored for OAEP).
|
KTSExtractKeySpec.Builder |
withMac(java.lang.String macAlgorithmName,
int macKeySizeInBits)
Set the MAC algorithm name and its associated key size for the MAC key in the encapsulation.
|
KTSExtractKeySpec.Builder |
withParameterSpec(java.security.spec.AlgorithmParameterSpec parameterSpec)
Set the algorithm parameter spec to be used with the private key.
|
public Builder(java.security.PrivateKey privateKey,
byte[] encapsulation,
java.lang.String algorithmName,
int keySizeInBits)
privateKey - the private key to use to extract the secret from the encapsulation.encapsulation - the encapsulated secret.algorithmName - the algorithm name for the secret key we wish to calculate.keySizeInBits - the size of the key we want to produce in bits.public Builder(java.security.PrivateKey privateKey,
byte[] encapsulation,
java.lang.String algorithmName,
int keySizeInBits,
byte[] otherInfo)
privateKey - the private key to use to extract the secret from the encapsulation.encapsulation - the encapsulated secret.algorithmName - the algorithm name for the secret key we wish to calculate.keySizeInBits - the size of the key we want to produce in bits.public KTSExtractKeySpec.Builder withKdfAlgorithm(FipsKDF.AgreementKDFParametersBuilder kdfAlgorithm)
kdfAlgorithm - the KDF algorithm to apply.public KTSExtractKeySpec.Builder withKdfAlgorithm(AlgorithmIdentifier kdfAlgorithm)
kdfAlgorithm - the KDF algorithm to apply.public KTSExtractKeySpec.Builder withKdfSalt(byte[] salt)
salt - the salt for initialising the KDF PRF.public KTSExtractKeySpec.Builder withMac(java.lang.String macAlgorithmName, int macKeySizeInBits)
macAlgorithmName - name of the MAC algorithm we will use.macKeySizeInBits - size of the MAC key (in bits)public KTSExtractKeySpec.Builder withParameterSpec(java.security.spec.AlgorithmParameterSpec parameterSpec)
parameterSpec - the algorithm parameter spec to be used in decryption.public KTSExtractKeySpec build()