When building cryptowallet we needed to store sensitive data such as passport scans and utility bills in a secure manner untill they were processed and moved to offline storage (note dont store these things online unless you want to look like that idiot Mark Karpeles)
We built this library that was adapted from elese where but i lost the link so there is some original credit to someone out there.
Full working library we used for cryptowallet will be relesed on the cryptowallet organizational git hub once i have a chance. for now feel free to look in the develop branch and implement how you like if you want to approach web security of confidential data correctly