java.lang.Object | ||
↳ | java.security.KeyPairGeneratorSpi | |
↳ | java.security.KeyPairGenerator |
KeyPairGenerator
is an engine class which is capable of generating a
private key and its related public key utilizing the algorithm it was
initialized with.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of
KeyPairGenerator with the name of
the algorithm to use. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Computes and returns a new unique
KeyPair each time this method
is called. | |||||||||||
Computes and returns a new unique
KeyPair each time this method
is called. | |||||||||||
Returns the name of the algorithm of this
KeyPairGenerator . | |||||||||||
Returns a new instance of
KeyPairGenerator that utilizes the
specified algorithm from the specified provider. | |||||||||||
Returns a new instance of
KeyPairGenerator that utilizes the
specified algorithm from the specified provider. | |||||||||||
Returns a new instance of
KeyPairGenerator that utilizes the
specified algorithm. | |||||||||||
Returns the provider associated with this
KeyPairGenerator . | |||||||||||
Initializes this
KeyPairGenerator with the given AlgorithmParameterSpec and the given SecureRandom . | |||||||||||
Initializes this
KeyPairGenerator with the given AlgorithmParameterSpec . | |||||||||||
Initializes this
KeyPairGenerator with the given key size. | |||||||||||
Initializes this
KeyPairGenerator with the given key size and the
given SecureRandom . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.security.KeyPairGeneratorSpi
| |||||||||||
From class java.lang.Object
|
Constructs a new instance of KeyPairGenerator
with the name of
the algorithm to use.
algorithm | the name of algorithm to use |
---|
Computes and returns a new unique KeyPair
each time this method
is called.
This does exactly the same as generateKeyPair().
KeyPair
each time this method is calledComputes and returns a new unique KeyPair
each time this method
is called.
This does exactly the same as genKeyPair().
KeyPair
each time this method is calledReturns the name of the algorithm of this KeyPairGenerator
.
KeyPairGenerator
Returns a new instance of KeyPairGenerator
that utilizes the
specified algorithm from the specified provider.
algorithm | the name of the algorithm to use |
---|---|
provider | the name of the provider |
KeyPairGenerator
that utilizes the
specified algorithm from the specified providerNoSuchAlgorithmException | if the specified algorithm is not available |
---|---|
NoSuchProviderException | if the specified provider is not available |
NullPointerException | if algorithm is null |
Returns a new instance of KeyPairGenerator
that utilizes the
specified algorithm from the specified provider.
algorithm | the name of the algorithm to use |
---|---|
provider | the provider |
KeyPairGenerator
that utilizes the
specified algorithm from the specified providerNoSuchAlgorithmException | if the specified algorithm is not available |
---|---|
NullPointerException | if algorithm is null |
Returns a new instance of KeyPairGenerator
that utilizes the
specified algorithm.
algorithm | the name of the algorithm to use |
---|
KeyPairGenerator
that utilizes the
specified algorithmNoSuchAlgorithmException | if the specified algorithm is not available |
---|---|
NullPointerException | if algorithm is null |
Returns the provider associated with this KeyPairGenerator
.
KeyPairGenerator
Initializes this KeyPairGenerator
with the given AlgorithmParameterSpec
and the given SecureRandom
.
param | the parameters to use |
---|---|
random | the source of randomness |
InvalidAlgorithmParameterException | if the specified parameters are not supported |
---|
Initializes this KeyPairGenerator
with the given AlgorithmParameterSpec
. A default SecureRandom
instance will be
used.
param | the parameters to use |
---|
InvalidAlgorithmParameterException | if the specified parameters are not supported |
---|
Initializes this KeyPairGenerator
with the given key size. The
default parameter set and a default SecureRandom
instance will be
used.
keysize | the size of the key (number of bits) |
---|
Initializes this KeyPairGenerator
with the given key size and the
given SecureRandom
. The default parameter set will be used.
keysize | the key size |
---|---|
random | the source of randomness |