org.fcrepo.server.journal.helpers
Class PasswordCipher
java.lang.Object
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:
- "" or null - empty cipher, clear text is the same as cipher text
- "1" - rotating key XOR cipher
- Author:
- Jim Blake
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PasswordCipher
public PasswordCipher()
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 © 2012 DuraSpace. All Rights Reserved.