Top Description Constructors Methods
org.conscrypt

public Class DESEDESecretKeyFactory

extends SecretKeyFactorySpi
Class Inheritance
Annotations
@Internal
Imports
java.security.InvalidKeyException, java.security.spec.InvalidKeySpecException, .KeySpec, javax.crypto.SecretKey, .SecretKeyFactorySpi, javax.crypto.spec.DESedeKeySpec, .SecretKeySpec

An implementation of javax.crypto.SecretKeyFactory for use with DESEDE keys. This class supports SecretKeySpec and DESedeKeySpec for key specs.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected SecretKey
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
engineGetKeySpec(SecretKey
the key
secretKey
,
Class<T>
the requested format in which the key material shall be returned
aClass
)

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGetKeySpec.

Returns a specification (key material) of the given key object in the requested format.
protected SecretKey
engineTranslateKey(SecretKey
the key whose provider is unknown or untrusted
secretKey
)

Implements abstract javax.crypto.SecretKeyFactorySpi.engineTranslateKey.

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

Constructor Detail

DESEDESecretKeyFactoryback to summary
public DESEDESecretKeyFactory()

Method Detail

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

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGenerateSecret.

Doc from 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

Annotations
@Override
Exceptions
InvalidKeySpecException:
if the given key specification is inappropriate for this secret-key factory to produce a secret key.
engineGetKeySpecback to summary
protected KeySpec engineGetKeySpec(SecretKey secretKey, Class<T> aClass) throws InvalidKeySpecException

Implements abstract javax.crypto.SecretKeyFactorySpi.engineGetKeySpec.

Doc from javax.crypto.SecretKeyFactorySpi.engineGetKeySpec.

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

Parameters
secretKey:SecretKey

the key

aClass:Class<T>

the requested format in which the key material shall be returned

Returns:KeySpec

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

Annotations
@Override
Exceptions
InvalidKeySpecException:
if the requested key specification is inappropriate for the given key (e.g., the algorithms associated with key 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).
engineTranslateKeyback to summary
protected SecretKey engineTranslateKey(SecretKey secretKey) throws InvalidKeyException

Implements abstract javax.crypto.SecretKeyFactorySpi.engineTranslateKey.

Doc from javax.crypto.SecretKeyFactorySpi.engineTranslateKey.

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

Parameters
secretKey:SecretKey

the key whose provider is unknown or untrusted

Returns:SecretKey

the translated key

Annotations
@Override
Exceptions
InvalidKeyException:
if the given key cannot be processed by this secret-key factory.