Class EncryptUtil

    • Method Detail

      • getInstance

        public static EncryptUtil getInstance()
      • main

        public static void main​(String[] args)
        This wraps encrypt(String) method. Will return an encrypted value to standard out using System.out.println(). It can be used for ad-hoc encryption of vars fortress.properties bound.
        Parameters:
        args - contains a single String to encrypt(String).
      • isEnabled

        public static boolean isEnabled()
        Returns 'true' if the property crypto.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.
      • decrypt

        public String decrypt​(String encryptedText)
        Decrypt a value using Jasypt utility.
        Parameters:
        encryptedText - contains the text to be decrypted.
        Returns:
        String containing decrypted text.