code: public static String encode(String decoded_string, String crypto_algorithm, String crypto_key)
                      throws InvalidPasswordEncodingException, UnsupportedCryptoAlgorithmException {
          HashMap<String, String> props = new HashMap<String, String>();
          if (crypto_key != null) {
              props.put(PROPERTY_CRYPTO_KEY, crypto_key);
          }
          return encode(decoded_string, crypto_algorithm, props);
      }
docs: Encode the provided string with the specified algorithm and the crypto key
  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 the AES encryption with the specific crypto key.
  Note that this method is only avaiable for the Liberty profile.
  @param decoded_string the string to be encoded.
  @param crypto_algorithm the algorithm to be used for encoding.
  @param crypto_key the key for the encryption. This value is only valid for aes algorithm.
  @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.