docs: public static String encryptWithKey(String string, String key)
        throws NoSuchPaddingException,
        NoSuchAlgorithmException,
        InvalidKeyException,
        BadPaddingException,
        IllegalBlockSizeException,
        InvalidAlgorithmParameterException
    {
      String encryptedString;
  
      byte[] encryptedStringData;
      
      //Create a random initialization vector
      SecureRandom random = new SecureRandom();
      byte[] randBytes = new byte[16];
      random.nextBytes(randBytes);
      IvParameterSpec iv = new IvParameterSpec(randBytes);
  
      SecretKeySpec skey = new SecretKeySpec(key.getBytes(), "AES");
      Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
      cipher.init(Cipher.ENCRYPT_MODE, skey, iv);
  
      byte[] ivBytes = iv.getIV();
      byte[] inputBytes = string.getBytes();
      byte[] plaintext = new byte[ivBytes.length + inputBytes.length];
  
      System.arraycopy(ivBytes, 0, plaintext, 0, ivBytes.length);
      System.arraycopy(inputBytes, 0, plaintext, ivBytes.length, inputBytes.length);
      
      encryptedStringData = cipher.doFinal(plaintext);
      encryptedString = Base64.encodeBase64String(encryptedStringData);
  
      return encryptedString;
    }