Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
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 the specification of the private key.
Returns
  • 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 the specification of the public key.
Returns
  • 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 the key from which the specification is requested.
keySpec the type of the requested KeySpec .
Returns
  • 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 the key to translate.
Returns
  • the translated key.
Throws
InvalidKeyException if the specified key can not be translated by this key factory.