java.lang.Object | |
↳ | javax.crypto.KeyGenerator |
This class provides the public API for generating symmetric cryptographic keys.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
KeyGenerator instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Generates a secret key.
| |||||||||||
Returns the name of the key generation algorithm.
| |||||||||||
Creates a new
KeyGenerator instance that provides the specified
key algorithm from the specified provider.
| |||||||||||
Creates a new
KeyGenerator instance that provides the specified
key algorithm from the specified provider.
| |||||||||||
Creates a new
KeyGenerator instance that provides the specified
key algorithm,
| |||||||||||
Returns the provider of this
KeyGenerator instance.
| |||||||||||
Initializes this
KeyGenerator instance with the specified
algorithm parameters and randomness source.
| |||||||||||
Initializes this
KeyGenerator instance with the specified
algorithm parameters.
| |||||||||||
Initializes this
KeyGenerator with the specified randomness
source.
| |||||||||||
Initializes this
KeyGenerator instance for the specified key size
(in bits) using the specified randomness source.
| |||||||||||
Initializes this
KeyGenerator instance for the specified key size
(in bits).
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates a new KeyGenerator
instance.
keyGenSpi | the implementation delegate. |
---|---|
provider | the implementation provider. |
algorithm | the name of the algorithm. |
Generates a secret key.
Returns the name of the key generation algorithm.
Creates a new KeyGenerator
instance that provides the specified
key algorithm from the specified provider.
algorithm | the name of the requested key algorithm. |
---|---|
provider | the name of the provider that is providing the algorithm. |
KeyGenerator
instance.NoSuchAlgorithmException | if the specified algorithm is not provided by the specified provider. |
---|---|
NoSuchProviderException | if the specified provider is not available. |
IllegalArgumentException | if the specified provider is name is null or empty. |
NullPointerException | if the specified algorithm name is null .
|
Creates a new KeyGenerator
instance that provides the specified
key algorithm from the specified provider. The provider
supplied does not have to be registered.
algorithm | the name of the requested key algorithm. |
---|---|
provider | the provider that is providing the algorithm |
KeyGenerator
instance.NoSuchAlgorithmException | if the specified algorithm is not provided by the specified provider. |
---|---|
IllegalArgumentException | if the specified provider is null . |
NullPointerException | if the specified algorithm name is null .
|
Creates a new KeyGenerator
instance that provides the specified
key algorithm,
algorithm | the name of the requested key algorithm |
---|
KeyGenerator
instance.NoSuchAlgorithmException | if the specified algorithm is not available by any provider. |
---|---|
NullPointerException | if algorithm is null .
|
Returns the provider of this KeyGenerator
instance.
KeyGenerator
instance.
Initializes this KeyGenerator
instance with the specified
algorithm parameters and randomness source.
params | the parameters for the key generation algorithm. |
---|---|
random | the randomness source for any random bytes. |
InvalidAlgorithmParameterException | if the parameters cannot be uses to initialize this key generator algorithm. |
---|
Initializes this KeyGenerator
instance with the specified
algorithm parameters.
params | the parameters for the key generation algorithm. |
---|
InvalidAlgorithmParameterException | if the parameters cannot be used to initialize this key generator algorithm. |
---|
Initializes this KeyGenerator
with the specified randomness
source.
random | the randomness source for any random bytes. |
---|
Initializes this KeyGenerator
instance for the specified key size
(in bits) using the specified randomness source.
keysize | the size of the key (in bits). |
---|---|
random | the randomness source for any random bytes. |
Initializes this KeyGenerator
instance for the specified key size
(in bits).
keysize | the size of the key (in bits). |
---|