Sign in
cobalt
/
cobalt
/
844f64e7fc64ade74c091fe8e669ea1d78157045
/
.
/
src
/
third_party
/
devtools
/
node_modules
/
buffer-xor
/
index.js
blob: 85ee6f631b18d164bca3994582a75ab73a4d93f1 [
file
] [
log
] [
blame
]
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
}