title: OpenSSL one line base64 input. error reading input file
body: <p>I have AES-encrypted file, which encoded to base64 one-line string (without breaklines) and need to decrypt it. <a href="http://pastebin.com/pDN2zkdq" rel="noreferrer">Here it is.</a></p>
  
  <p>But when i use:</p>
  
  <pre><code>openssl enc -d -a -aes-256-cbc -in encrypted -out decrypted
  </code></pre>
  
  <p>OpenSSL throws "error reading input file"<br>
  But base64 util decrypts it like a charm:</p>
  
  <pre><code>base64 -d encrypted | openssl enc -d -aes-256-cbc &gt; decrypted
  </code></pre>
  
  <p>Trying to find find the cause and convert to one-line base64 file:</p>
  
  <pre><code>base64 -w 0 aesfile | openssl enc -d -a -aes-256-cbc &gt; decrypted
  # error reading input file
  
  base64 aesfile | openssl enc -d -a -aes-256-cbc &gt; decrypted
  # no errors, file decrypted
  </code></pre>
  
  <p>Conclusion: OpenSSL can't decode non-multiline base64 inputs</p>