public interface OaepKeyPairGenerator
Modifier and Type | Method and Description |
---|---|
void |
initialize(java.security.spec.AlgorithmParameterSpec params)
Initializes this OaepKeyPairGenerator with the given RSAOaepParameterSpec.
|
void |
initialize(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
Initializes this OaepKeyPairGenerator with given OaepKeyPairGenerator and
random number generator.
|
void |
initialize(int strength,
java.security.spec.AlgorithmParameterSpec params)
Initializes the OaepKeyPairGenerator for generating keys with the given
length and OAEP parameters.
|
void |
initialize(int strength,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom secureRandom)
Initializes the OaepKeyPairGenerator for a certain key length with the
given random number generator and OAEP parameters.
|
void |
initialize(int strength,
java.math.BigInteger publicExponent,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom secureRandom)
Initializes the key pair generator using the specified "strength" (desired
key length in bits), public exponent, source of random bits, and OAEP
parameters.
|
void initialize(int strength, java.security.spec.AlgorithmParameterSpec params) throws java.security.InvalidParameterException
OaepKeyPairGenerator
is required:
OaepKeyPairGenerator keyGen = (OaepKeyPairGenerator)KeyPairGenerator.getInstance("RSAES-OAEP", "IAIK"); keyGen.initialize(strength, oaepParamSpec); ...
strength
- the length of the key in bits.params
- the OAEP parameters to be set for the RSAES-OAEP keysjava.security.InvalidParameterException
- if the supplied parameters do not represent OAEP
parameters
void initialize(int strength, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom secureRandom) throws java.security.InvalidParameterException
OaepKeyPairGenerator
is required:
OaepKeyPairGenerator keyGen = (OaepKeyPairGenerator)KeyPairGenerator.getInstance("RSAES-OAEP", "IAIK"); keyGen.initialize(strength, oaepParamSpec, secureRandom); ...
strength
- the length of the key in bits.params
- the OAEP parameters to be set for the RSAES-OAEP keyssecureRandom
- the random number generatorjava.security.InvalidParameterException
- if the supplied parameters do not represent OAEP
parameters
void initialize(int strength, java.math.BigInteger publicExponent, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom secureRandom) throws java.security.InvalidParameterException
OaepKeyPairGenerator
is required:
OaepKeyPairGenerator keyGen = (OaepKeyPairGenerator)KeyPairGenerator.getInstance("RSAES-OAEP", "IAIK"); keyGen.initialize(strength, publicExponent, oaepParamSpec, secureRandom); ...
strength
- keyLength the length of the key in bits.publicExponent
- the public exponentparams
- the OAEP parameters to be set for the RSAES-OAEP keyssecureRandom
- the random seedjava.security.InvalidParameterException
- if the supplied parameters do not represent OAEP
parameters
void initialize(java.security.spec.AlgorithmParameterSpec params) throws java.security.InvalidAlgorithmParameterException
params
- the OaepKeyPairGenerator for initializing this generatorjava.security.InvalidAlgorithmParameterException
- if the given parameter specification is not a
RSAOaepParameterSpecvoid initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException
params
- the RSAOaepParameterSpec for initializing this generatorrandom
- the SecureRandom for generating random numbersjava.security.InvalidAlgorithmParameterException
- if the given parameter specification is not a
RSAOaepParameterSpec