"Downloading" a computed value form JavaScript
Posted
by Travis Jensen
on Stack Overflow
See other posts from Stack Overflow
or by Travis Jensen
Published on 2010-06-16T04:22:30Z
Indexed on
2010/06/16
4:32 UTC
Read the original article
Hit count: 322
I'm hoping you can prove me wrong here (please, please, please! ;). I have a situation where I need to download encrypted data from a Server D (for "Data"). Server K (for "Key") has the encryption key. For security sake, I would really prefer that Server D never know the key that Server K knows. What I want is my client (e.g. your browser) to connect to Server D for the data and Server K for the key and doe the decryption locally so the unencrypted stuff never leaves your computer.
I can do this fine for text areas in the dom by replacing the contents of the HTML. However, sometimes, I would like to do larger files that I stream to the file system. For instance, perhaps I want to encrypt a movie and decrypt it and stream the contents to the my video player.
I am not a JavaScript guru by any stretch, especially when it comes to the edge cases of things like the security sandbox.
For Small D, I can handle the decryption, but I don't know how to save the decrypted file. Large D seems problematic as memory runs out.
Anybody have any ideas that don't involve native plugins?
Thanks!
© Stack Overflow or respective owner