Encrypting files in the browser with javascript is a perfectly valid approach to security storing content. It's just hard to get right.
Re:Megafail
by lawnchair_larry on Wednesday January 23, 2013 @01:00AM
(#5101706)
I think I just heard tptacek flip his table over from here
To not encrypt files via a browser using javascript.
One reason this particular flaw happened was due to the need to secure all content loaded insecurely by index.html, for example.