    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.www.dsig.SigSuiteRegistry

    java.lang.Object
       |
       +----w3c.www.dsig.SigSuiteRegistry

public final class SigSuiteRegistry
extends Object

The SignatureRegistry class maintains a database of the DSig signature suites installed on the system. They can be retrieved here via there identifying URLs as defined in the DSig specification. When this class is loaded, it automatically searches the default Java security provider for the algorithms DSA and installs it if presents (it normally is, as it is part of the Sun provider).

Limitations of this class: only one implementation of each algorithm can be in the database at one time.

##

DSSURL
  The URL defined to indentify the DSS (DSA/SHA1) Signature algorithm.
RSAMD5URL
  The URL defined to indentify the RSA-MD5 Signature algorithm.
RSASHA1URL
  The URL defined to indentify the RSA-SHA1 Signature algorithm.

##

addAlgorithm(String, Class)
  Add a new signature algorithm, identified via name, implemented by the class clazz.
algorithms()
  Return an enumeration of the URL names of the currently installed algorithms.
getImplementor(String)
  Return the Class object of the class implementing the algorithm name.
getInstance(String)
  Get an instance of a class implementing the Signature algorithm name.
isInstalled(String)
  Find out if the specified algorithm is installed in the registry.
printAlgorithms()
  Print the list of currently installed Signature algorithms and the classes that implement them to stdout.
removeAlgorithm(String)
  Remove the named algorithm from the registry.
size()
  Return the number of installed signature suites.

##

DSSURL

     public static final String DSSURL

  The URL defined to indentify the DSS (DSA/SHA1) Signature algorithm. Currently this is `http://www.w3.org/TR/1998/REC-DSig-label/DSS-1_0`.

RSAMD5URL

     public static final String RSAMD5URL

  The URL defined to indentify the RSA-MD5 Signature algorithm. Currently this is `http://www.w3.org/TR/1998/REC-DSig-label/RSA-MD5-1_0`.

RSASHA1URL

     public static final String RSASHA1URL

  The URL defined to indentify the RSA-SHA1 Signature algorithm. Currently this is `http://www.w3.org/PICS/DSig/RSA-SHA1-1_0.html`.

##

size

     public static int size()

  Return the number of installed signature suites.

algorithms

     public static Enumeration algorithms()

  Return an enumeration of the URL names of the currently installed algorithms.

printAlgorithms

     public static void printAlgorithms()

  Print the list of currently installed Signature algorithms and the classes that implement them to stdout.

addAlgorithm

     public static boolean addAlgorithm(String name,
                                        Class clazz)

  Add a new signature algorithm, identified via name, implemented by the class clazz. Returns true is successful, false otherwise (algorithm already present) or the class represented by the clazz object does not implement a signature suite.

isInstalled

     public static boolean isInstalled(String name)

  Find out if the specified algorithm is installed in the registry.

removeAlgorithm

     public static boolean removeAlgorithm(String name)

  Remove the named algorithm from the registry. Returns true if successful, false if the algorithm was not installed.

getInstance

     public static SignatureSuite getInstance(String name) throws NoSuchAlgorithmException

  Get an instance of a class implementing the Signature algorithm name. Name is the URL identifying the algorithm.

  Throws: NoSuchAlgorithmException
    if the corresponding signature algorithm cannot be found

getImplementor

     public static Class getImplementor(String name) throws NoSuchAlgorithmException

  Return the Class object of the class implementing the algorithm name.

  Throws: NoSuchAlgorithmException
    if the algorithm is not installed.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index