Top Description Fields Constructors Methods
sun.security.pkcs11

pack-priv final Class P11TlsRsaPremasterSecretGenerator

extends KeyGeneratorSpi
Class Inheritance
Imports
java.security.*, java.security.spec.AlgorithmParameterSpec, javax.crypto.*, javax.crypto.spec.*, sun.security.internal.spec.TlsRsaPremasterSecretParameterSpec, sun.security.pkcs11.wrapper.*

KeyGenerator for the SSL/TLS RSA premaster secret.
Author
Andreas Sterbenz
Since
1.6

Field Summary

Modifier and TypeField and Description
private final String
private final long
private static final String
private TlsRsaPremasterSecretParameterSpec
spec

References Deprecated TlsRsaPremasterSecretParameterSpec is deprecated or references (maybe indirectly) at least one deprecated element.
private final boolean
private final Token

Constructor Summary

AccessConstructor and Description
pack-priv
P11TlsRsaPremasterSecretGenerator(Token token, String algorithm, long mechanism)

Method Summary

Modifier and TypeMethod and Description
protected SecretKey
engineGenerateKey()

Implements abstract javax.crypto.KeyGeneratorSpi.engineGenerateKey.

Generates a secret key.

protected void
engineInit(SecureRandom
the source of randomness for this generator
random
)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Initializes the key generator.

protected void
engineInit(AlgorithmParameterSpec
the key generation parameters
params
,
SecureRandom
the source of randomness for this key generator
random
)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Initializes the key generator with the specified parameter set and a user-provided source of randomness.

protected void
engineInit(int
the keysize. This is an algorithm-specific metric, specified in number of bits.
keysize
,
SecureRandom
the source of randomness for this key generator
random
)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Initializes this key generator for a certain keysize, using the given source of randomness.

Field Detail

algorithmback to summary
private final String algorithm
mechanismback to summary
private final long mechanism
MSGback to summary
private static final String MSG
specback to summary
private TlsRsaPremasterSecretParameterSpec spec

References Deprecated

TlsRsaPremasterSecretParameterSpec is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Annotations
@SuppressWarnings:deprecation
supportSSLv3back to summary
private final boolean supportSSLv3
tokenback to summary
private final Token token

Constructor Detail

P11TlsRsaPremasterSecretGeneratorback to summary
pack-priv P11TlsRsaPremasterSecretGenerator(Token token, String algorithm, long mechanism) throws PKCS11Exception

Method Detail

engineGenerateKeyback to summary
protected SecretKey engineGenerateKey()

Implements abstract javax.crypto.KeyGeneratorSpi.engineGenerateKey.

Doc from javax.crypto.KeyGeneratorSpi.engineGenerateKey.

Generates a secret key.

Returns:SecretKey

the new key

engineInitback to summary
protected void engineInit(SecureRandom random)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Doc from javax.crypto.KeyGeneratorSpi.engineInit.

Initializes the key generator.

Parameters
random:SecureRandom

the source of randomness for this generator

engineInitback to summary
protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Doc from javax.crypto.KeyGeneratorSpi.engineInit.

Initializes the key generator with the specified parameter set and a user-provided source of randomness.

Parameters
params:AlgorithmParameterSpec

the key generation parameters

random:SecureRandom

the source of randomness for this key generator

Annotations
@SuppressWarnings:deprecation
Exceptions
InvalidAlgorithmParameterException:
if params is inappropriate for this key generator
engineInitback to summary
protected void engineInit(int keysize, SecureRandom random)

Implements abstract javax.crypto.KeyGeneratorSpi.engineInit.

Doc from javax.crypto.KeyGeneratorSpi.engineInit.

Initializes this key generator for a certain keysize, using the given source of randomness.

Parameters
keysize:int

the keysize. This is an algorithm-specific metric, specified in number of bits.

random:SecureRandom

the source of randomness for this key generator