From b7a0d1f2e5e9018b4da9b467fc96ac732debbe99 Mon Sep 17 00:00:00 2001 From: Christophe Diederichs Date: Wed, 17 Jun 2020 13:13:05 +0200 Subject: [PATCH] sodium_memcmp returns boolean --- crypto_verify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_verify.js b/crypto_verify.js index 8bc08bf..29ab54c 100644 --- a/crypto_verify.js +++ b/crypto_verify.js @@ -23,5 +23,5 @@ function crypto_verify_32(x, xi, y, yi) { function sodium_memcmp (a, b) { assert(a.byteLength = b.byteLength, 'buffers must be the same size') - return vn(a, 0, b, 0, a.byteLength) + return vn(a, 0, b, 0, a.byteLength) === 0 }