title: IllegalBlockSizeException: Input length not multiple of 16 bytes AES/ECB/NoPadding
body: <p>I have this snippet, Not sure why I am getting irregular results with this snippet.</p>
  <p><strong>Clue</strong>: Works well with a short string of fewer than 200 characters but when the string is in the ranges of 260 characters and above, it throws a <code>javax.crypto.IllegalBlockSizeException: Input length not multiple of 16 bytes</code>.</p>
  <pre><code>      Cipher cipher = Cipher.getInstance(&quot;AES/ECB/NoPadding&quot;);
        byte[] key = &quot;secret_key&quot;.getBytes(StandardCharsets.UTF_8);
        SecretKeySpec secretKey = new SecretKeySpec(key, &quot;AES&quot;);
        cipher.init(Cipher.ENCRYPT_MODE, secretKey);
        byte[] cipherText = cipher.doFinal(request.getBytes(StandardCharsets.UTF_8));
        String encryptedText = Base64.encodeBase64String(cipherText);
  </code></pre>