java.lang.Object | |
↳ | javax.crypto.SecretKeyFactory |
The public API for SecretKeyFactory
implementations.
Secret key factories provide the following functionality:
SecretKey
objects to and from KeySpec
objectsSecretKey
objects from one provider implementation to
anothergenerateSecret(KeySpec)
and
getKeySpec(SecretKey, Class)
is provider dependent.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
SecretKeyFactory |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Generate a secret key from the specified key specification.
| |||||||||||
Returns the name of the secret key algorithm.
| |||||||||||
Creates a new
SecretKeyFactory instance for the specified key
algorithm from the specified provider . | |||||||||||
Creates a new
SecretKeyFactory instance for the specified key
algorithm from the specified provider. | |||||||||||
Creates a new
SecretKeyFactory instance for the specified key
algorithm. | |||||||||||
Returns the key specification of the specified secret key.
| |||||||||||
Returns the provider for this
SecretKeyFactory instance. | |||||||||||
Translates the specified secret key into an instance of the corresponding
key from the provider of this key factory.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates a new SecretKeyFactory
keyFacSpi | the SPI delegate. |
---|---|
provider | the provider providing this key factory. |
algorithm | the algorithm name for the secret key. |
Generate a secret key from the specified key specification.
keySpec | the key specification. |
---|
InvalidKeySpecException | if the specified key specification cannot be used to generate a secret key. |
---|
Returns the name of the secret key algorithm.
Creates a new SecretKeyFactory
instance for the specified key
algorithm from the specified provider
.
algorithm | the name of the key algorithm. |
---|---|
provider | the name of the provider that provides the requested algorithm. |
NoSuchAlgorithmException | if the specified provider cannot provide the requested algorithm. |
---|---|
NoSuchProviderException | if the specified provider does not exist. |
IllegalArgumentException | if the specified provider name is null or empty.
|
Creates a new SecretKeyFactory
instance for the specified key
algorithm from the specified provider. The provider
supplied
does not have to be registered.
algorithm | the name of the key algorithm. |
---|---|
provider | the provider that provides the requested algorithm. |
NoSuchAlgorithmException | if the specified provider cannot provider the requested algorithm. |
---|---|
IllegalArgumentException | if the specified provider is null . |
NullPointerException | is the specified algorithm name is null .
|
Creates a new SecretKeyFactory
instance for the specified key
algorithm.
algorithm | the name of the key algorithm. |
---|
NoSuchAlgorithmException | if no installed provider can provide the requested algorithm. |
---|---|
NullPointerException | if the specified algorithm is null .
|
Returns the key specification of the specified secret key.
key | the secret key to get the specification from. |
---|---|
keySpec | the target key specification class. |
InvalidKeySpecException | if the specified secret key cannot be transformed into the requested key specification. |
---|
Returns the provider for this SecretKeyFactory
instance.
SecretKeyFactory
instance.
Translates the specified secret key into an instance of the corresponding key from the provider of this key factory.
key | the secret key to translate. |
---|
InvalidKeyException | if the specified key cannot be translated using this key factory. |
---|