aswi2020vldc-gitlab/templetes/node_modules/buffer-xor/inplace.js @ 0b434236
1 |
module.exports = function xorInplace (a, b) { |
---|---|
2 |
var length = Math.min(a.length, b.length) |
3 |
|
4 |
for (var i = 0; i < length; ++i) { |
5 |
a[i] = a[i] ^ b[i] |
6 |
}
|
7 |
|
8 |
return a.slice(0, length) |
9 |
}
|