SecretKeyFactory class.
All the abstract methods in this class must be implemented by each
cryptographic service provider who wishes to supply the implementation
of a secret key factory for a particular algorithm.
A provider should document all the key specifications supported by its
secret key factory.
For example, the DES secret key factory supplied by the "SunJCE" provider
supports DESKeySpec as a transparent representation of DES
keys, and that provider's secret key factory for Triple DES keys supports
DESedeKeySpec as a transparent representation of Triple DES
keys.
SecretKey, javax.crypto.spec.DESKeySpec , javax.crypto.spec.DESedeKeySpec
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract SecretKey | Returns: the secret keythe specification (key material) of the secret key keySpec)Generates a |
| protected abstract KeySpec | Returns: the underlying key specification (key material) in the requested formatthe key key, Class<?> the requested format in which the key material shall be
returned keySpec)Returns a specification (key material) of the given key object in the requested format. |
| protected abstract SecretKey | Returns: the translated keythe key whose provider is unknown or untrusted key)Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret key factory. |
| SecretKeyFactorySpi | back to summary |
|---|---|
| public SecretKeyFactorySpi() Constructor for subclasses to call. | |
| engineGenerateSecret | back to summary |
|---|---|
| protected abstract SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException Generates a
| |
| engineGetKeySpec | back to summary |
|---|---|
| protected abstract KeySpec engineGetKeySpec(SecretKey key, Class<?> keySpec) throws InvalidKeySpecException Returns a specification (key material) of the given key object in the requested format.
| |
| engineTranslateKey | back to summary |
|---|---|
| protected abstract SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret key factory.
| |