Top Description Methods
org.bouncycastle.crypto

public Interface EncapsulatingSecretGenerator<T extends Parameters>

extends OperatorUsingSecureRandom<EncapsulatingSecretGenerator<T extends Parameters>>
Known Direct Implementers
org.bouncycastle.crypto.fips.FipsEncapsulatingSecretGenerator
Type Parameters
<T>
the type for the parameters used by this generator.
Imports
java.security.SecureRandom

Interface describing an encapsulated secret generator, such as for RSA KTS.

Method Summary

Modifier and TypeMethod and Description
public SecretWithEncapsulation

Returns:

details for a new encapsulated secret.
generate
()

Generate an encapsulated secret, returning the encapsulation of the key material, and the key material, or secret, as well.

public T

Returns:

the extractor parameters.
getParameters
()

Return the parameters being used by this extractor.

public EncapsulatingSecretGenerator<T>

Returns:

a generator using the passed in random as its source of key material.
withSecureRandom
(SecureRandom
the SecureRandom to use.
random
)

Redeclares org.bouncycastle.crypto.OperatorUsingSecureRandom.withSecureRandom.

Return a new generator which will use the passed in SecureRandom for generating the key material, or secret, to be encapsulated.

Method Detail

generateback to summary
public SecretWithEncapsulation generate() throws PlainInputProcessingException

Generate an encapsulated secret, returning the encapsulation of the key material, and the key material, or secret, as well.

Returns:SecretWithEncapsulation

details for a new encapsulated secret.

Exceptions
PlainInputProcessingException:
if an exception occurs on encapsulation.
getParametersback to summary
public T getParameters()

Return the parameters being used by this extractor.

Returns:T

the extractor parameters.

withSecureRandomback to summary
public EncapsulatingSecretGenerator<T> withSecureRandom(SecureRandom random)

Redeclares org.bouncycastle.crypto.OperatorUsingSecureRandom.withSecureRandom.

Return a new generator which will use the passed in SecureRandom for generating the key material, or secret, to be encapsulated.

Parameters
random:SecureRandom

the SecureRandom to use.

Returns:EncapsulatingSecretGenerator<T>

a generator using the passed in random as its source of key material.