Package org.bouncycastle.crypto
Interface EncapsulatingSecretGenerator<T extends Parameters>
-
- Type Parameters:
T
- the type for the parameters used by this generator.
- All Superinterfaces:
OperatorUsingSecureRandom<EncapsulatingSecretGenerator<T>>
- All Known Implementing Classes:
FipsEncapsulatingSecretGenerator
public interface EncapsulatingSecretGenerator<T extends Parameters> extends OperatorUsingSecureRandom<EncapsulatingSecretGenerator<T>>
Interface describing an encapsulated secret generator, such as for RSA KTS.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SecretWithEncapsulation
generate()
Generate an encapsulated secret, returning the encapsulation of the key material, and the key material, or secret, as well.T
getParameters()
Return the parameters being used by this extractor.EncapsulatingSecretGenerator<T>
withSecureRandom(java.security.SecureRandom random)
Return a new generator which will use the passed in SecureRandom for generating the key material, or secret, to be encapsulated.
-
-
-
Method Detail
-
getParameters
T getParameters()
Return the parameters being used by this extractor.- Returns:
- the extractor parameters.
-
generate
SecretWithEncapsulation generate() throws PlainInputProcessingException
Generate an encapsulated secret, returning the encapsulation of the key material, and the key material, or secret, as well.- Returns:
- details for a new encapsulated secret.
- Throws:
PlainInputProcessingException
- if an exception occurs on encapsulation.
-
withSecureRandom
EncapsulatingSecretGenerator<T> withSecureRandom(java.security.SecureRandom random)
Return a new generator which will use the passed in SecureRandom for generating the key material, or secret, to be encapsulated.- Specified by:
withSecureRandom
in interfaceOperatorUsingSecureRandom<T extends Parameters>
- Parameters:
random
- the SecureRandom to use.- Returns:
- a generator using the passed in random as its source of key material.
-
-