title: Encryption / decryption of binary data in the browser
body: <p>I am working on a project that requires a client to de-crypt binary data received from the server. The scenario is that a server has binary data in a compressed and encrypted form. The browser needs to receive this data (files), decrypt and decompress them and then download them to a user-specified location on the local machine. I understand that their are several limitations of doing this in the browser -</p>
  
  <ol>
  <li><p>Does Javascript have access to the local storage. Can I write/stream multiple files to a user-specified location on the hard drive? If so, what APIs to look for.  </p></li>
  <li><p>Can Javascript (or any other technology) be used in the browser to decrypt (AES-256) and decompress this data stream within the browser?   </p></li>
  </ol>
  
  <p>Can these issues be solved using the <a href="http://www.w3.org/TR/FileAPI/" rel="nofollow">FileAPI</a> of HTML5?  </p>
  
  <p><strong>EDIT:</strong><br>
  Replaced SHA2 with AES. We are using SHA2 for integrity check, not for encryption.That was a typo. </p>