All Packages Class Hierarchy This Package Previous Next Index
Class au.net.aba.crypto.provider.DESedeKeyFactory
java.lang.Object
|
+----javax.crypto.SecretKeyFactorySpi
|
+----au.net.aba.crypto.provider.DESedeKeyFactory
- public class DESedeKeyFactory
- extends SecretKeyFactorySpi
This class is used to convert DESede keys into a format usable by the
ABA provider. The supported KeySpec classes are DESedeKeySpec and
SecretKeySpec. In the case of the SecretKeySpec the keydata must be
at least 24 bytes long and there must be no encoding on the key data.
The supported Key class is DESKey.
This class should not be instantiated directly, instead use the
java.security.KeyFactory interface.
- See Also:
- KeyFactory
-
ident
-
-
DESedeKeyFactory()
-
-
engineGenerateSecret(KeySpec)
- Generates a DESede SecretKey object from the provided key
specification (key material).
-
engineGetKeySpec(SecretKey, Class)
- Returns a specification (key material) of the given key object in
the requested format.
-
engineTranslateKey(SecretKey)
- Translates a DESede key object, whose provider may be unknown or
potentially untrusted, into a corresponding key object of this key
factory.
ident
public static final String ident
DESedeKeyFactory
public DESedeKeyFactory()
engineGenerateSecret
protected SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException
- Generates a DESede SecretKey object from the provided key
specification (key material). This class supports the
DESedeKeySpec and SecretKeySpec KeySpec classes.
- Returns:
- s The secret key.
- Throws: InvalidKeySpecException
- The provided KeySpec was not
a DESKeySpec or SecretKeySpec KeySpec.
- Overrides:
- engineGenerateSecret in class SecretKeyFactorySpi
engineGetKeySpec
protected KeySpec engineGetKeySpec(SecretKey key,
Class keySpec) throws InvalidKeySpecException
- Returns a specification (key material) of the given key object in
the requested format.
Can convert from ABA's DESede keys into either a SecretKeySpec
or DESedeKeySpec instance.
- Parameters:
- key - the key
- keySpec - the requested format in which the key material shall
be returned
- Returns:
- s the underlying key specification (key material) in the
requested format
- Throws: InvalidKeySpecException
- if the requested key
specification is inappropriate for the given key, or the given
key cannot be dealt with (e.g., the given key has an
unrecognised format).
- Overrides:
- engineGetKeySpec in class SecretKeyFactorySpi
engineTranslateKey
protected SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException
- Translates a DESede key object, whose provider may be unknown or
potentially untrusted, into a corresponding key object of this key
factory.
- Parameters:
- key - - the key whose provider is unknown or untrusted
- Returns:
- s the translated key
- Throws: InvalidKeyException
- if the given key cannot be processed
by this key factory.
- Overrides:
- engineTranslateKey in class SecretKeyFactorySpi
All Packages Class Hierarchy This Package Previous Next Index