Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.crypto.SecretKeyFactorySpi
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.
Method Summary | |
SecretKey | engineGenerateSecret(java.security.spec.KeySpec keySpec)
Generates a SecretKey object from the
provided key specification (key material). |
java.security.spec.KeySpec | engineGetKeySpec(SecretKey key,
java.lang.Class keySpec)
Returns a specification (key material) of the given key object in the requested format. |
SecretKey | engineTranslateKey(SecretKey key)
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory. |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Method Detail |
protected abstract SecretKey engineGenerateSecret(java.security.spec.KeySpec keySpec) throws java.security.spec.InvalidKeySpecException
SecretKey
object from the
provided key specification (key material).
keySpec
- the specification (key material) of the secret keyprotected abstract java.security.spec.KeySpec engineGetKeySpec(SecretKey key, java.lang.Class keySpec) throws java.security.spec.InvalidKeySpecException
key
- the key
keySpec
- the requested format in which the key material shall be
returnedkey
and keySpec
do not match, or
key
references a key on a cryptographic hardware device
whereas keySpec
is the specification of a software-based
key), or the given key cannot be dealt with
(e.g., the given key has an algorithm or format not supported by this
secret-key factory).protected abstract SecretKey engineTranslateKey(SecretKey key) throws java.security.InvalidKeyException
key
- the key whose provider is unknown or untrustedOverview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |