validate aead decryption

This commit is contained in:
Marin Petrunić
2020-03-01 19:05:53 +01:00
parent b93a50c8b0
commit 638b0773e5
14 changed files with 115 additions and 115 deletions

View File

@ -46,7 +46,7 @@ describe("IK Handshake", () => {
// Test encryption and decryption
const encrypted = handshakeInit.encrypt(Buffer.from("encryptthis"), handshakeInit.session);
const decrypted = handshakeResp.decrypt(encrypted, handshakeResp.session);
const {plaintext: decrypted} = handshakeResp.decrypt(encrypted, handshakeResp.session);
assert(decrypted.equals(Buffer.from("encryptthis")));
} catch (e) {
console.error(e);