Skip to content

Commit 53c2c5b

Browse files
committed
refactor(a2): use hash of the password as encryption key
1 parent 41fff99 commit 53c2c5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

a2/actions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ async function login(userInput, passInput) {
131131

132132
// If the login was successful, show the dashboard.
133133
if (result.response.ok) {
134-
sessionStorage.setItem('encryption_key', password);
134+
const encryptionKey = await hashMessage(password);
135+
136+
sessionStorage.setItem('encryption_key', encryptionKey);
135137

136138
showContent("dashboard");
137139
} else {

0 commit comments

Comments
 (0)