APIdia Launch Partner
Top Description Constructors Methods
com.sun.crypto.provider

public final Class DESedeKeyFactory

extends SecretKeyFactorySpi
Class Inheritance
Imports
javax.crypto.SecretKey, .SecretKeyFactorySpi, javax.crypto.spec.DESedeKeySpec, .SecretKeySpec, java.security.InvalidKeyException, java.security.spec.KeySpec, .InvalidKeySpecException, java.util.Arrays

This class implements the DES-EDE key factory of the Sun provider.
Author
Jan Luehe

Constructor Summary

AccessConstructor and Description
public
DESedeKeyFactory()

Empty constructor

Method Summary

Modifier and TypeMethod and Description
protected SecretKey

Returns:

the secret key
engineGenerateSecret
(KeySpec
the specification (key material) of the secret key
keySpec
)

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGenerateSecret.

Generates a SecretKey object from the provided key specification (key material).

protected KeySpec

Returns:

the underlying key specification (key material) in the requested format
engineGetKeySpec
(SecretKey
the key
key
,
Class<?>
the requested format in which the key material shall be returned
keySpec
)

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGetKeySpec.

Returns a specification (key material) of the given key in the requested format.

protected SecretKey

Returns:

the translated key
engineTranslateKey
(SecretKey
the key whose provider is unknown or untrusted
key
)

Implements abstract javax.crypto.SecretKeyFactorySpi.engineTranslateKey.

Translates a SecretKey object, whose provider may be unknown or potentially untrusted, into a corresponding SecretKey object of this key factory.

Constructor Detail

DESedeKeyFactoryback to summary
public DESedeKeyFactory()

Empty constructor

Method Detail

engineGenerateSecretback to summary
protected SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGenerateSecret.

Generates a SecretKey object from the provided key specification (key material).

Parameters
keySpec:KeySpec

the specification (key material) of the secret key

Returns:SecretKey

the secret key

Exceptions
InvalidKeySpecException:
if the given key specification is inappropriate for this key factory to produce a public key.
engineGetKeySpecback to summary
protected KeySpec engineGetKeySpec(SecretKey key, Class<?> keySpec) throws InvalidKeySpecException

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGetKeySpec.

Returns a specification (key material) of the given key in the requested format.

Parameters
key:SecretKey

the key

keySpec:Class<?>

the requested format in which the key material shall be returned

Returns:KeySpec

the underlying key specification (key material) in the requested format

Exceptions
InvalidKeySpecException:
if the requested key specification is inappropriate for the given key, or the given key cannot be processed (e.g., the given key has an unrecognized algorithm or format).
engineTranslateKeyback to summary
protected SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException

Implements abstract javax.crypto.SecretKeyFactorySpi.engineTranslateKey.

Translates a SecretKey object, whose provider may be unknown or potentially untrusted, into a corresponding SecretKey object of this key factory.

Parameters
key:SecretKey

the key whose provider is unknown or untrusted

Returns:SecretKey

the translated key

Exceptions
InvalidKeyException:
if the given key cannot be processed by this key factory.