org.apache.fulcrum.crypto
Class DefaultCryptoService

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.fulcrum.crypto.DefaultCryptoService
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.thread.ThreadSafe, CryptoService

public class DefaultCryptoService
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements CryptoService, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.thread.ThreadSafe

An implementation of CryptoService that uses either supplied crypto Algorithms (provided in the component config xml file) or tries to get them via the normal java mechanisms if this fails.

Version:
$Id: DefaultCryptoService.java 581797 2007-10-04 08:26:18Z sgoeschl $
Author:
Eric Pugh, Henning P. Schmiedehausen

Field Summary
 
Fields inherited from interface org.apache.fulcrum.crypto.CryptoService
ROLE
 
Constructor Summary
DefaultCryptoService()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
          Avalon component lifecycle method
 void dispose()
          Avalon component lifecycle method
 CryptoAlgorithm getCryptoAlgorithm(String algo)
          Returns a CryptoAlgorithm Object which represents the requested crypto algorithm.
 void initialize()
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCryptoService

public DefaultCryptoService()
Method Detail

getCryptoAlgorithm

public CryptoAlgorithm getCryptoAlgorithm(String algo)
                                   throws NoSuchAlgorithmException
Returns a CryptoAlgorithm Object which represents the requested crypto algorithm.

Specified by:
getCryptoAlgorithm in interface CryptoService
Parameters:
algo - Name of the requested algorithm
Returns:
An Object representing the algorithm
Throws:
NoSuchAlgorithmException - Requested algorithm is not available

configure

public void configure(org.apache.avalon.framework.configuration.Configuration conf)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Avalon component lifecycle method

Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
Exception
See Also:
Initializable.initialize()

dispose

public void dispose()
Avalon component lifecycle method



Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.