org.fcrepo.server.journal.helpers
Class PasswordCipher

java.lang.Object
  extended by org.fcrepo.server.journal.helpers.PasswordCipher

public class PasswordCipher
extends Object

Encipher the password so we aren't writing it to the file in clear.

The encipher method does not allow options for cipher type. It should always use the latest and greatest. The decipher method accepts different cipher types so it can be used to read older Journal Files. Known types include:

Author:
Jim Blake

Constructor Summary
PasswordCipher()
           
 
Method Summary
static String decipher(String key, String cipherText, String cipherType)
          Use the key to produce a clear text String from the cipherText.
static String encipher(String key, String clearText)
          Use the key to produce a ciphered String from the clearText.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordCipher

public PasswordCipher()
Method Detail

encipher

public static String encipher(String key,
                              String clearText)
Use the key to produce a ciphered String from the clearText.


decipher

public static String decipher(String key,
                              String cipherText,
                              String cipherType)
Use the key to produce a clear text String from the cipherText. If no key is provided, or if no type is specified, just return the text as is.



Copyright © 2011 DuraSpace. All Rights Reserved.