sam.cipher
Class Registry

java.lang.Object
  |
  +--sam.cipher.Registry

public class Registry
extends java.lang.Object

Central repository of all Cipher implementations


Constructor Summary
Registry()
           
 
Method Summary
 boolean exists(java.lang.String name)
          Wether specified name is that of an already registered Cipher factory
 java.lang.String[] getCiphers()
          Gets the names of all registered ciphers.
 java.lang.String getDescription(java.lang.String name)
          Gets the description of the cipher registered under specified name, or default string if not available (This never returns null).
 int getNumberOfCiphers()
           
 java.lang.String register(sam.cipher.Factory factory)
          Registers a new Cipher class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registry

public Registry()
Method Detail

register

public java.lang.String register(sam.cipher.Factory factory)
                          throws java.lang.Error
Registers a new Cipher class.

java.lang.Error

exists

public boolean exists(java.lang.String name)
Wether specified name is that of an already registered Cipher factory


getNumberOfCiphers

public int getNumberOfCiphers()
Returns:
the number of registered ciphers.

getCiphers

public java.lang.String[] getCiphers()
Gets the names of all registered ciphers.


getDescription

public java.lang.String getDescription(java.lang.String name)
Gets the description of the cipher registered under specified name, or default string if not available (This never returns null).

Parameters:
name - the registration name of desired cipher.