Android APIs
public abstract class

KeyFactorySpi

extends Object
java.lang.Object
   ↳ java.security.KeyFactorySpi

Class Overview

KeyFactorySpi is the Service Provider Interface (SPI) definition for KeyFactory.

See also:

Summary

Public Constructors
KeyFactorySpi()
Protected Methods
abstract PrivateKey engineGeneratePrivate(KeySpec keySpec)
Generates a instance of PrivateKey from the given key specification.
abstract PublicKey engineGeneratePublic(KeySpec keySpec)
Generates a instance of PublicKey from the given key specification.
abstract <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec)
Returns the key specification for the specified key.
abstract Key engineTranslateKey(Key key)
Translates the given key into a key from this key factory.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public KeyFactorySpi ()

Added in API level 1

Protected Methods

protected abstract PrivateKey engineGeneratePrivate (KeySpec keySpec)

Added in API level 1

Generates a instance of PrivateKey from the given key specification.

Parameters
keySpec KeySpec: the specification of the private key.
Returns
PrivateKey the private key.
Throws
InvalidKeySpecException if the specified keySpec is invalid.

protected abstract PublicKey engineGeneratePublic (KeySpec keySpec)

Added in API level 1

Generates a instance of PublicKey from the given key specification.

Parameters
keySpec KeySpec: the specification of the public key.
Returns
PublicKey the public key.
Throws
InvalidKeySpecException if the specified keySpec is invalid.

protected abstract T engineGetKeySpec (Key key, Class<T> keySpec)

Added in API level 1

Returns the key specification for the specified key.

Parameters
key Key: the key from which the specification is requested.
keySpec Class: the type of the requested KeySpec.
Returns
T the key specification for the specified key.
Throws
InvalidKeySpecException if the key can not be processed, or the requested requested KeySpec is inappropriate for the given key.

protected abstract Key engineTranslateKey (Key key)

Added in API level 1

Translates the given key into a key from this key factory.

Parameters
key Key: the key to translate.
Returns
Key the translated key.
Throws
InvalidKeyException if the specified key can not be translated by this key factory.