From dca672723c0a2b30a7b2617e05ec1095fede76a3 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sun, 15 Sep 2019 10:16:35 +0200 Subject: [PATCH] naming asserts --- handshake-state.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handshake-state.js b/handshake-state.js index 3468d33..d2b2560 100644 --- a/handshake-state.js +++ b/handshake-state.js @@ -183,8 +183,8 @@ function sodiumBufferCopy (src) { } function initialize (handshakePattern, initiator, prologue, s, e, rs, re) { - assert(Object.keys(PATTERNS).includes(handshakePattern)) - assert(typeof initiator === 'boolean') + assert(Object.keys(PATTERNS).includes(handshakePattern), 'Unsupported handshake pattern') + assert(typeof initiator === 'boolean', 'Initiator must be a boolean') assert(prologue.byteLength != null) assert(s == null ? true : s.publicKey.byteLength === dh.PKLEN)