If you don't care about IE9 (or older), you can create Blobencrypted text to store:
var blob = new Blob([encrypted], { type: 'text/plain' });
, , Blob . MDN (. Blob ctor MDN)
var typedArray = GetTheTypedArraySomehow();
var blob = new Blob([typedArray], {type: 'application/octet-binary'});
<a> blob:
var link = document.createElement('a');
link.download = 'Encrypted document';
link.href = URL.createObjectURL(blob);
, :
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
IE8, , Wikipedia , SO: , .