title: Input length must be multiple of 16 when decrypting with padded cipher
body: <p>I have a server and client socket program, a server send a encrypted message to client, i.e. 
  the server side code: </p>
  
  <pre><code>cipher2 = Cipher.getInstance("AES"); 
  secretKeySpec = new SecretKeySpec(decryptedText, "AES");
  cipher2.init(Cipher.ENCRYPT_MODE, secretKeySpec);
  feedback = "Your answer is wrong".getBytes();
  cipher2.doFinal(feedback);
  dos.writeInt(feedback.length);
  dos.write(feedback);
  </code></pre>
  
  <p>the client side code:</p>
  
  <pre><code>int result_len = 0;
  result_len = din.readInt();            
  byte[] result_Bytes = new byte[result_len];
  din.readFully(result_Bytes);
  cipher2 = Cipher.getInstance("AES");
  cipher2.init(Cipher.DECRYPT_MODE, aesKey);             
  byte[] encrypt = cipher2.doFinal(result_Bytes);
  </code></pre>
  
  <p>Exception throw at <code>byte[] encrypt = cipher2.doFinal(result_Bytes);</code></p>
  
  <pre><code>javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
      at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:750)
      at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
      at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)
      at javax.crypto.Cipher.doFinal(Cipher.java:2086)
  </code></pre>
  
  <p>what is the problem?</p>