code: public static String encrypt(String key, String plainText) {
          SecretKey secret = new SecretKeySpec(Base64.decodeBase64(key.getBytes(StandardCharsets.UTF_8)), "AES");
          return encryptBouncyCastle(secret, plainText);
      }
docs: Encrypt the plain text.
  
  @param key
  256 bit key base64 encoded
  @param plainText
  text that needs to be encrypted
  @return the iv as a hex string followed by '$' followed by the encrypted text.