This page demonstrates the ability to encrypt information stored locally on a client's computer / mobile device for caching purposes. User Name and Password are not stored in plain text, instead both are hashed and stored in sessionStorage. The resulting hash is used as the two-way AES encryption key. After a user logs out or their session expires, data stored in localStorage is encrypted and inaccessible. After the user logs in again, they regain access to the encrypted data.
Start by setting a UserName and Password. Use any string of numbers or letters which you can remember later.
(UserName and Password are CaSe SensiTive)
Enter as much information as you like. Each entry will be encrypted and stored in your browser's localStorage.
Data as stored in LocalStorage:
Enter the same UserName and Password combination to decrypt any data you previously stored. Even if you close your browser and restart your machine, the data will persist and remain encrypted.
Decrypted data from localStorage: