FileDocCategorySizeDatePackage
SecretKeyFactorySpi.javaAPI DocAndroid 1.5 API2982Wed May 06 22:41:02 BST 2009javax.crypto

SecretKeyFactorySpi

public abstract class SecretKeyFactorySpi extends Object
The Service Provider Interface (SPI) definition for the {@code SecretKeyFactory} class.
since
Android 1.0

Fields Summary
Constructors Summary
public SecretKeyFactorySpi()
Creates a new {@code SecretKeyFactorySpi} instance.

since
Android 1.0

    
Methods Summary
protected abstract javax.crypto.SecretKeyengineGenerateSecret(java.security.spec.KeySpec keySpec)
Generate a secret key from the specified key specification.

param
keySpec the key specification.
return
a secret key.
throws
InvalidKeySpecException if the specified key specification cannot be used to generate a secret key.
since
Android 1.0

protected abstract java.security.spec.KeySpecengineGetKeySpec(javax.crypto.SecretKey key, java.lang.Class keySpec)
Returns the key specification of the specified secret key.

param
key the secret key to get the specification from.
param
keySpec the target key specification class.
return
an instance of the specified key specification class.
throws
InvalidKeySpecException if the specified secret key cannot be transformed into the requested key specification.
since
Android 1.0

protected abstract javax.crypto.SecretKeyengineTranslateKey(javax.crypto.SecretKey key)
Translates the specified secret key into an instance of the corresponding key from the provider of this key factory.

param
key the secret key to translate.
return
the corresponding translated key.
throws
InvalidKeyException if the specified key cannot be translated using this key factory.
since
Android 1.0