\href{http://travis-ci.org/crypto-browserify/buffer-xor}{\texttt{ }} \href{https://www.npmjs.org/package/buffer-xor}{\texttt{ }}

\href{https://github.com/feross/standard}{\texttt{ }}

A simple module for bitwise-\/xor on buffers.\hypertarget{md_sfcode_node_modules_buffer_xor_README_autotoc_md4679}{}\doxysection{Examples}\label{md_sfcode_node_modules_buffer_xor_README_autotoc_md4679}

\begin{DoxyCode}{0}
\DoxyCodeLine{var xor = require("{}buffer-\/xor"{})}
\DoxyCodeLine{var a = new Buffer('00ff0f', 'hex')}
\DoxyCodeLine{var b = new Buffer('f0f0', 'hex')}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(xor(a, b))}
\DoxyCodeLine{// => <Buffer f0 0f> }

\end{DoxyCode}


Or for those seeking those few extra cycles, perform the operation in place\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var xorInplace = require("{}buffer-\/xor/inplace"{})}
\DoxyCodeLine{var a = new Buffer('00ff0f', 'hex')}
\DoxyCodeLine{var b = new Buffer('f0f0', 'hex')}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(xorInplace(a, b))}
\DoxyCodeLine{// => <Buffer f0 0f>}
\DoxyCodeLine{// NOTE: xorInplace will return the shorter slice of its parameters}
\DoxyCodeLine{}
\DoxyCodeLine{// See that a has been mutated}
\DoxyCodeLine{console.log(a)}
\DoxyCodeLine{// => <Buffer f0 0f 0f> }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_buffer_xor_README_autotoc_md4680}{}\doxysection{License \mbox{[}\+MIT\mbox{]}(\+LICENSE)}\label{md_sfcode_node_modules_buffer_xor_README_autotoc_md4680}
