AES Secret generation

I have an application I want to update my license to a new api key it uses an AES cipher to encrypt the api type I am using.

What I know:

API_KEY: M9I7PGD2-EQ2O4TDH-SGYBZUS5-VGE3E65Q

AES Secret: wb6xsFpi8T6wMOp7OyUXzA==

Decrypted Text: Poloniex

public static String de(String secret, String apikey) { try { Cipher cipher = Cipher.getInstance("AES"); cipher.init(2, new SecretKeySpec(apikey.substring(0, 16).getBytes(), "AES")); return new String(cipher.doFinal(Base64.getDecoder().decode(secret))); } catch (Exception e) { e.printStackTrace(); return "ERROR"; } }

Given that I know what the decrypted text is I know how its decrypted do I have any recourse for generating new secretkey for the encryption


Nevermind I consider this resolved I simply forgot to change the cipher flag from decode to encode