sodium_memcmp returns boolean

This commit is contained in:
Christophe Diederichs 2020-06-17 13:13:05 +02:00
parent 9b78e675e4
commit b7a0d1f2e5

View File

@ -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
}