org.apache.turbine.services.crypto.provider
Class UnixCrypt

java.lang.Object
  extended byorg.apache.turbine.services.crypto.provider.UnixCrypt
All Implemented Interfaces:
CryptoAlgorithm

public class UnixCrypt
extends java.lang.Object
implements CryptoAlgorithm

Implements Standard Unix crypt(3) for use with the Crypto Service.

Version:
$Id: UnixCrypt.java 613402 2008-01-19 15:16:34Z seade $
Author:
Henning P. Schmiedehausen

Constructor Summary
UnixCrypt()
          C'tor
 
Method Summary
 java.lang.String encrypt(java.lang.String value)
          encrypt the supplied string with the requested cipher
 void setCipher(java.lang.String cipher)
          This class never uses anything but UnixCrypt, so it is just a dummy (Fixme: Should we throw an exception if something is requested that we don't support?
 void setSeed(java.lang.String seed)
          Setting the seed for the UnixCrypt algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnixCrypt

public UnixCrypt()
C'tor

Method Detail

setCipher

public void setCipher(java.lang.String cipher)
This class never uses anything but UnixCrypt, so it is just a dummy (Fixme: Should we throw an exception if something is requested that we don't support?

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

setSeed

public void setSeed(java.lang.String seed)
Setting the seed for the UnixCrypt algorithm. If a null value is supplied, or no seed is set, then a random seed is used.

Specified by:
setSeed in interface CryptoAlgorithm
Parameters:
seed - The seed value to use.

encrypt

public java.lang.String encrypt(java.lang.String value)
                         throws java.lang.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:
java.lang.Exception - An Exception of the underlying implementation.


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