code: public static String encode(String decoded_string, String crypto_algorithm) throws InvalidPasswordEncodingException, UnsupportedCryptoAlgorithmException {
          return encode(decoded_string, crypto_algorithm, (String) null);
      }
docs: Encode the provided password by using the specified encoding algorithm. The encoded string consistes of the
  algorithm of the encoding and the encoded value.
  If the decoded_string is already encoded, the string will be decoded and then encoded by using the specified crypto algorithm.
  Use this method for encoding the string by using specific encoding algorithm.
  Use securityUtility encode --listCustom command line utility to see if any additional custom encryptions are supported.
  
  @param decoded_string the string to be encoded.
  @param crypto_algorithm the algorithm to be used for encoding. The supported values are xor, aes, or hash.
  @return The encoded string.
  @throws InvalidPasswordEncodingException If the decoded_string is null or invalid. Or the encoded_string is null.
  @throws UnsupportedCryptoAlgorithmException If the algorithm is not supported.