biofriction-wp-theme/node_modules/buffer-xor/index.js

11 lines
206 B
JavaScript
Raw Normal View History

2021-10-26 14:18:09 +02:00
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
}