sodium_memcmp returns boolean
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user