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
Modifier and TypeMethodDescriptiongenerate()
Generate an encapsulated secret, returning the encapsulation of the key material, and the key material, or secret, as well.Return the parameters being used by this extractor.withSecureRandom
(SecureRandom random) Return a new generator which will use the passed in SecureRandom for generating the key material, or secret, to be encapsulated.
-
Method Details
-
getParameters
T getParameters()Return the parameters being used by this extractor.- Returns:
- the extractor parameters.
-
generate
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
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.
-