Class EncryptUtil
- java.lang.Object
-
- org.apache.directory.fortress.core.util.EncryptUtil
-
public final class EncryptUtil extends Object
Contains a simple wrapper for Jasypt open source encryption APIs, see Jasypt.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
decrypt(String encryptedText)
Decrypt a value using Jasypt utility.String
encrypt(String clearText)
Encrypt a value using Jasypt utility.static EncryptUtil
getInstance()
static boolean
isEnabled()
Returns 'true' if the propertycrypto.prop
has a value set in fortress cfg.static void
main(String[] args)
This wrapsencrypt(String)
method.
-
-
-
Method Detail
-
getInstance
public static EncryptUtil getInstance()
-
main
public static void main(String[] args)
This wrapsencrypt(String)
method. Will return an encrypted value to standard out using System.out.println(). It can be used for ad-hoc encryption of varsfortress.properties
bound.- Parameters:
args
- contains a single String toencrypt(String)
.
-
isEnabled
public static boolean isEnabled()
Returns 'true' if the propertycrypto.prop
has a value set in fortress cfg. If this value is 'false', Fortress will assume LDAP password in cfg file are clear text.- Returns:
- boolean
-
encrypt
public String encrypt(String clearText)
Encrypt a value using Jasypt utility.- Parameters:
clearText
- contains the text to be encrypted.- Returns:
- String containing encrypted text.
-
-