Encryption / Decryption Of Binary Data In The Browser
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.
Solution 1:
- You can't directly access the user's file system. Though, the HTML5 file system API can be used to save data in a virtual, sandboxed filesystem.
- CryptoJS has an implementation for SHA-2
To receive the data from the server, I suggest to use XMLHttpRequest
with responseType = "arraybuffer"
.
Solution 2:
I suggest you use a javascript cryptography library, here is one: http://code.google.com/p/crypto-js/
Post a Comment for "Encryption / Decryption Of Binary Data In The Browser"