buffer-xor icon indicating copy to clipboard operation
buffer-xor copied to clipboard

Should actually import Buffer before trying to use it.

Open m12lrpv opened this issue 3 years ago • 0 comments

module.exports = function xor (a, b) {
  var length = Math.min(a.length, b.length)
  var buffer = new Buffer(length)

  for (var i = 0; i < length; ++i) {
    buffer[i] = a[i] ^ b[i]
  }

  return buffer
}

Buffer is undefined.

m12lrpv avatar Jul 15 '22 08:07 m12lrpv