API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.security. KeyFactory View Source
Author(s)
Jan Luehe
Since
1.2
Version
1.35, 04/21/06
Serial
Hierarchy
 Object
      KeyFactory
Implements
Subclasses
Description
public class KeyFactory
  Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
Constructors
protected KeyFactory (KeyFactorySpi keyFacSpi, Provider provider, String algorithm)
  Creates a KeyFactory object.
private KeyFactory (String algorithm) throws NoSuchAlgorithmException
Methods
Hide/Show inherited methods
publicfinal PrivateKey generatePrivate (KeySpec keySpec) throws InvalidKeySpecException
  Generates a private key object from the provided key specification (key material).
publicfinal PublicKey generatePublic (KeySpec keySpec) throws InvalidKeySpecException
  Generates a public key object from the provided key specification (key material).
publicfinal String getAlgorithm ()
  Gets the name of the algorithm associated with this KeyFactory.
publicstatic KeyFactory getInstance (String algorithm) throws NoSuchAlgorithmException
  Returns a KeyFactory object that converts public/private keys of the specified algorithm.
publicstatic KeyFactory getInstance (String algorithm, Provider provider) throws NoSuchAlgorithmException
  Returns a KeyFactory object that converts public/private keys of the specified algorithm.
publicstatic KeyFactory getInstance (String algorithm, String provider) throws NoSuchAlgorithmException NoSuchProviderException
  Returns a KeyFactory object that converts public/private keys of the specified algorithm.
publicfinal T getKeySpec (Key key, Class< T> keySpec) throws InvalidKeySpecException
  Returns a specification (key material) of the given key object.
publicfinal Provider getProvider ()
  Returns the provider of this key factory object.
publicfinal Key translateKey (Key key) throws InvalidKeyException
  Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar