title: AES decryption and 'invalid pkcs #7 block padding'
body: <p>I have this code to try decryption:</p>
  
  <pre><code>byte key[AES::DEFAULT_KEYLENGTH];
  string key_s = "essasenhaehfraca";
  
  for (int i = 0; i &lt; key_s.size(); i++)
      key[i] = (byte) key_s[i];
  
  string ciphertext = "A506A19333F306AC2C62CBE931963AE7DFCFFA940360A40FFD5DC69B9C2E53AD"
  string decryptedtext;
  
  try
  {
      ECB_Mode&lt; AES &gt;::Decryption decryptor;
      decryptor.SetKey(key, sizeof(key));
      CryptoPP::StringSource(ciphertext, true,
              new CryptoPP::StreamTransformationFilter( decryptor,
                  new CryptoPP::StringSink( decryptedtext )
              )
      );
  
  }
  catch(const CryptoPP::Exception&amp; e)
  {
      cerr &lt;&lt; e.what() &lt;&lt; endl;
      system("pause");
      exit(1);
  }
  
  return 0;
  </code></pre>
  
  <p>When I execute it, I get the exception
  <code>StreamTransformationFilter: invalid pkcs #7 block padding found</code>.
  I searched and didn't find anything. Someone knows why I get this error? Every example I found in the internet is in this same way and none of them mention this error.</p>