const salt = randomBytes(16);const iv = randomBytes(12);const key = deriveKey(password, salt);const sealed = AES-GCM(message, key, iv);localStorage.setItem(sealed);Encrypted before it is saved.
The browser derives a key from your password and encrypts the message before the app writes capsule data to LocalStorage.