org.apache.fulcrum.crypto.provider
Class ClearCrypt

java.lang.Object
  extended by org.apache.fulcrum.crypto.provider.ClearCrypt
All Implemented Interfaces:
CryptoAlgorithm

public class ClearCrypt
extends Object
implements CryptoAlgorithm

This is a dummy for "cleartext" encryption. It goes through the notions of the CryptoAlgorithm interface but actually does nothing. It can be used as a replacement for the "encrypt = no" setting in TurbineResources. Can be used as the default crypto algorithm

Version:
$Id: ClearCrypt.java 535465 2007-05-05 06:58:06Z tv $
Author:
Henning P. Schmiedehausen

Constructor Summary
ClearCrypt()
          C'tor
 
Method Summary
 String encrypt(String value)
          encrypt the supplied string with the requested cipher
 void setCipher(String cipher)
          This class never uses an algorithm, so this is just a dummy.
 void setSeed(String seed)
          This class never uses a seed, so this is just a dummy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClearCrypt

public ClearCrypt()
C'tor

Method Detail

setCipher

public void setCipher(String cipher)
This class never uses an algorithm, so this is just a dummy.

Specified by:
setCipher in interface CryptoAlgorithm
Parameters:
cipher - Cipher (ignored)

setSeed

public void setSeed(String seed)
This class never uses a seed, so this is just a dummy.

Specified by:
setSeed in interface CryptoAlgorithm
Parameters:
seed - Seed (ignored)

encrypt

public String encrypt(String value)
               throws Exception
encrypt the supplied string with the requested cipher

Specified by:
encrypt in interface CryptoAlgorithm
Parameters:
value - The value to be encrypted
Returns:
The encrypted value
Throws:
Exception - An Exception of the underlying implementation.


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