Cryptix OpenPGP

cryptix.pki
Class KeyIDFactory

java.lang.Object
  extended bycryptix.pki.KeyIDFactory

public class KeyIDFactory
extends java.lang.Object

A class for generating a KeyID

Version:
$Revision: 1.2 $
Author:
Edwin Woudt

Constructor Summary
protected KeyIDFactory(KeyIDFactorySpi builderSpi, java.security.Provider provider, java.lang.String format)
          Create a new KeyIDFactory object containing the given SPI object.
 
Method Summary
 KeyID generateKeyID(java.security.Key key)
          Generates a KeyID from a key.
 java.lang.String getFormat()
          Returns the name of the format of this object.
static KeyIDFactory getInstance(java.lang.String format)
          Returns a KeyIDFactory that implements the given format.
static KeyIDFactory getInstance(java.lang.String format, java.security.Provider provider)
          Returns a KeyIDFactory from the given provider that implements the given format.
static KeyIDFactory getInstance(java.lang.String format, java.lang.String provider)
          Returns a KeyIDFactory from the given provider that implements the given format.
 java.security.Provider getProvider()
          Returns the provider of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyIDFactory

protected KeyIDFactory(KeyIDFactorySpi builderSpi,
                       java.security.Provider provider,
                       java.lang.String format)
Create a new KeyIDFactory object containing the given SPI object.

Method Detail

getInstance

public static KeyIDFactory getInstance(java.lang.String format)
                                throws java.security.NoSuchAlgorithmException
Returns a KeyIDFactory that implements the given format.

Throws:
java.security.NoSuchAlgorithmException

getInstance

public static KeyIDFactory getInstance(java.lang.String format,
                                       java.lang.String provider)
                                throws java.security.NoSuchAlgorithmException,
                                       java.security.NoSuchProviderException
Returns a KeyIDFactory from the given provider that implements the given format.

Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException

getInstance

public static KeyIDFactory getInstance(java.lang.String format,
                                       java.security.Provider provider)
                                throws java.security.NoSuchAlgorithmException,
                                       java.security.NoSuchProviderException
Returns a KeyIDFactory from the given provider that implements the given format.

Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException

getProvider

public final java.security.Provider getProvider()
Returns the provider of this object.


getFormat

public final java.lang.String getFormat()
Returns the name of the format of this object.


generateKeyID

public final KeyID generateKeyID(java.security.Key key)
                          throws java.security.InvalidKeyException
Generates a KeyID from a key.

Throws:
java.security.InvalidKeyException - if the given key is not of the right type to produce a KeyID.

Cryptix OpenPGP

Copyright (C) 1999-2003 The Cryptix Foundation Ltd.