From 433d54efd19b405f37173d1bc36214ea05f784c0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 30 Jan 2019 21:41:40 +0100 Subject: Added AES message encryption --- public/scripts/chat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/scripts/chat.js') diff --git a/public/scripts/chat.js b/public/scripts/chat.js index 13c7839..9a01a0e 100644 --- a/public/scripts/chat.js +++ b/public/scripts/chat.js @@ -156,7 +156,7 @@ function chat() { $('#messages').append(`${message}
`); } else { if (message.type === 'text') { - await encryption.storeMsg(connectedPeer.peer, message.data); + await encryption.storeMsg(connectedPeer.peer, message.data, passphrase); await encryption.decrypt(message.data, await encryption.get(connectedPeer.peer), await encryption.getPrivate(), passphrase) .then(plaintext => $('#messages').append(`${plaintext}
`)); } else if (message.type === 'key') { -- cgit v1.2.3