de.fhg.igd.crypto
Class Providers

java.lang.Object
  extended by de.fhg.igd.crypto.Providers

public class Providers
extends Object

Sets and resets the JCE Providers.

Version:
"$Id: Providers.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth

Field Summary
static String ALG_ALIAS
          Prefix for algorithm alias properties of a crypto provider.
static String DESCR
          The definitions of options understood by this tool.
static String INDENT
          A string of blanks for simple beautifying of output.
protected static Map pmap_
          The map that maps provider names to their base class.
 
Constructor Summary
Providers()
           
 
Method Summary
static void add(String[] aliases)
          Adds the given providers.
protected static void clear()
          Clears the list of registered Java Security Providers.
static void dumpProviders(PrintStream out)
          Prints the list of registered Providers to the given PrintStream.
static Map initProviderMap()
          Initialises the map that maps names of providers to the repsective provider classes.
static void main(String[] argv)
           
static void printAliases(PrintStream out)
          Prints the list of known alias names to the given PrintStream.
static void printProviders(PrintStream out)
          Prints the list of registered Providers to the given PrintStream.
static void searchAlgorithm(PrintStream out, String alg)
          Searches an algorithm within the registered provider list and prints the search result to the given PrintStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DESCR

public static final String DESCR
The definitions of options understood by this tool.

See Also:
Constant Field Values

INDENT

public static final String INDENT
A string of blanks for simple beautifying of output.

See Also:
Constant Field Values

ALG_ALIAS

public static final String ALG_ALIAS
Prefix for algorithm alias properties of a crypto provider.

See Also:
Constant Field Values

pmap_

protected static Map pmap_
The map that maps provider names to their base class.

Constructor Detail

Providers

public Providers()
Method Detail

initProviderMap

public static Map initProviderMap()
Initialises the map that maps names of providers to the repsective provider classes.


printAliases

public static void printAliases(PrintStream out)
                         throws IOException
Prints the list of known alias names to the given PrintStream.

Parameters:
out - The PrintStream to which the known aliases are written.
Throws:
IOException

printProviders

public static void printProviders(PrintStream out)
Prints the list of registered Providers to the given PrintStream.

Parameters:
out - The PrintStream to which the list of registered Providers is written.

dumpProviders

public static void dumpProviders(PrintStream out)
Prints the list of registered Providers to the given PrintStream.

Parameters:
out - The PrintStream to which the list of registered Providers is written.

searchAlgorithm

public static void searchAlgorithm(PrintStream out,
                                   String alg)
Searches an algorithm within the registered provider list and prints the search result to the given PrintStream.

Parameters:
out - The PrintStream to which the search result is written.
out - The algorithm to search within the registered provider list.

clear

protected static void clear()
Clears the list of registered Java Security Providers.


add

public static void add(String[] aliases)
                throws NoSuchProviderException
Adds the given providers. The given strings can either be known aliases of the providers, or the names of the classes of the Providers.

Parameters:
aliases - The known aliases of the Providers to add, or the names of the respective classes.
Throws:
NoSuchProviderException - if the class of a given Provider cannot be found.

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.