title: Temporarily decrypt file in shell
body: <p>I've got a lot of secrets stored in <code>myfile.txt</code>, which I have to access more or less daily. So I encrypted it using <code>openssl</code> and decrypt it when I need to look at it:</p>
  
  <pre><code>openssl aes-256-cbc -a -d -in myfile.txt.enc
  </code></pre>
  
  <p>This will display the file in my terminal, however it will also stay there - is there a way to only temporarily decrypt a file into a buffer that I can view, and afterwards securely erasing that buffer? Simplicity is king here, I just want to quickly get some numbers from an encrypted file.</p>
  
  <p>Bonus points: this is the script I use if I have to edit my encrypted file - is that method safe, security-wise?</p>
  
  <pre><code>openssl aes-256-cbc -a -d -in myfile.txt.enc &gt; /tmp/myfile
  vim /tmp/myfile
  openssl aes-256-cbc -a -e -in /tmp/myfile -out myfile.txt.enc
  shred -zu /tmp/myfile
  </code></pre>