org.apache.turbine.services.crypto
Class TurbineCryptoService

java.lang.Object
  extended byorg.apache.turbine.services.BaseInitable
      extended byorg.apache.turbine.services.BaseService
          extended byorg.apache.turbine.services.crypto.TurbineCryptoService
All Implemented Interfaces:
CryptoService, Initable, Service

public class TurbineCryptoService
extends BaseService
implements CryptoService

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

Version:
$Id: TurbineCryptoService.java 534527 2007-05-02 16:10:59Z tv $
Author:
Henning P. Schmiedehausen

Field Summary
 
Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, serviceBroker
 
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
 
Fields inherited from interface org.apache.turbine.services.crypto.CryptoService
SERVICE_NAME
 
Constructor Summary
TurbineCryptoService()
           
 
Method Summary
 CryptoAlgorithm getCryptoAlgorithm(java.lang.String algo)
          Returns a CryptoAlgorithm Object which represents the requested crypto algorithm.
 void init()
          There is not much to initialize here.
 
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
 
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, init, setInit, setInitableBroker, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, setInitableBroker, shutdown
 

Constructor Detail

TurbineCryptoService

public TurbineCryptoService()
Method Detail

init

public void init()
          throws InitializationException
There is not much to initialize here. This runs as early init method.

Specified by:
init in interface Initable
Overrides:
init in class BaseInitable
Throws:
InitializationException - Something went wrong in the init stage

getCryptoAlgorithm

public CryptoAlgorithm getCryptoAlgorithm(java.lang.String algo)
                                   throws java.security.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:
java.security.NoSuchAlgorithmException - Requested algorithm is not available


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.