Class StringConversionUtil


  • public final class StringConversionUtil
    extends java.lang.Object
    This class is used to house utilities to manipulate Strings.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String OBFUSCATE_PREFIX  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String decString​(java.lang.String text)
      This method will decrypt the incoming String with the standard encryption algorithm.
      java.lang.String encString​(java.lang.String plainText)
      This method will encrypt the incoming String with the standard encryption algorithm.
      static void main​(java.lang.String[] args)  
      void updatePropertyFile​(java.lang.String key, java.util.Properties properties, java.lang.String propertyFilename)
      Update the properties file with the Obfuscated pwd
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • OBFUSCATE_PREFIX

        protected static final java.lang.String OBFUSCATE_PREFIX
        See Also:
        Constant Field Values
    • Constructor Detail

      • StringConversionUtil

        public StringConversionUtil()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • encString

        public java.lang.String encString​(java.lang.String plainText)
                                   throws java.lang.Exception
        This method will encrypt the incoming String with the standard encryption algorithm. The incoming String may contain international characters. UTF8 is used wherever an encoding is needed.
        Parameters:
        plainText - The plain text string to be encoded. It may be empty. A NULL reference will cause an exception
        Returns:
        The encrypted String.
        Throws:
        StringUtilException - If an error occured during encryption. or the param was a NULL reference.
        java.lang.IllegalArgumentException - If the plainText argument is a NULL reference.
        java.lang.Exception
      • decString

        public java.lang.String decString​(java.lang.String text)
                                   throws java.lang.Exception
        This method will decrypt the incoming String with the standard encryption algorithm. The incoming String must have been produced by the encString() method call.
        Parameters:
        text - The encrypted string. A NULL reference will cause an exception
        Returns:
        The decrypted String.
        Throws:
        StringUtilException - If an error occured during decryption.
        java.lang.IllegalArgumentException - If the text argument is a NULL reference.
        java.lang.Exception
      • updatePropertyFile

        public void updatePropertyFile​(java.lang.String key,
                                       java.util.Properties properties,
                                       java.lang.String propertyFilename)
                                throws java.lang.Exception
        Update the properties file with the Obfuscated pwd
        Parameters:
        properties -
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)