2.0.2 • Published 7 years ago

buffer-xor v2.0.2

Weekly downloads
11,333,403
License
MIT
Repository
github
Last release
7 years ago

buffer-xor

NPM Package Build Status

js-standard-style

A simple module for bitwise-xor on buffers.

Examples

var xor = require('buffer-xor')
var a = new Buffer('00ff0f', 'hex')
var b = new Buffer('f0f0', 'hex')

console.log(xor(a, b))
// => <Buffer f0 0f 0f>

Or for those seeking those few extra cycles, perform the operation in place with xorInplace:

NOTE: xorInplace won't xor past the bounds of the buffer it mutates so make sure it is long enough!

var xorInplace = require('buffer-xor/inplace')
var a = new Buffer('00ff0f', 'hex')
var b = new Buffer('f0f0', 'hex')

console.log(xorInplace(a, b))
// => <Buffer f0 0f 0f>

// See that a has been mutated
console.log(a)
// => <Buffer f0 0f 0f>

License MIT

browserify-aes@lodestar/beacon-nodevuedragdropuploadimagesphoton-libbb-chat@fundefund/funde_ckgql_din_mod@l1nyanm1ng/react-picture-viewer@evekran/ml-encryptcthpb-plugin-socialcogoportutilsjs4cytoscape@infinitebrahmanuniverse/nolb-buf@saaspe/components@go-hd/op-get@everything-registry/sub-chunk-1271ichashjsgrid-component-react-ex-1iota-paper-encryptionipfs-kad-routerinfinispanguruwayguruway.jshardhat-teaxyzhardhat-teaplughereditashue-node-dtlshelp-widgetgenerator-bootstrap-boilerplate-templatefrdrk-js-semaphorefreemambahive-multisig-sdkhot-zone-vuejesusdemokafirchain-tetris@simstudio/htmldiff@oriduk/ckeditor5-rebuild-musicanote@oriduk/ckeditor5-rebuild-oridukenvelope-jsenefti-galeriforminput-ui-libflowable-bpmn-modelerfork-react-ffmpegfn-lib-examplegassefalsgassefals-2dynamics-contracts-xeditorjs-alerticonseasyplayer-myfastlion-picture-viewerfahad-redux-axios-midlewareethash-b3jsethashjsfhir2minisignmiracle-webpack-tree-shakinglrbceshim2m-chartjs-plugin-crosshairkountexamplejs-offsjs-utils-jll2neotracker-shared-webng-search-dropdownmelis-ecryptmggauharmfchf-litemichael-stunmfkdfmiguelcostero-ng2-toastylibp2p-kad-routinglitepie-datepicker-gabeneo-blockchain-corenetwork-node-servernetwork-node-szooknode-unioncardowt-client-javascriptoutils-rennode-red-contrib-plejdnois-react-toastnguyepin-encryptorparvan_componentsparvan_reactjs_componentspixiu-swap-corepixiuswap-libs-sdkplaykit-js-hls-sondqreact-otp-input-uptdreactjs-github-widgetraicsqudratic-uiquadratic-sdkqyx-hmtldiffprova-cmpprova-cpm-2prova-cpm-3prova-cpm-4prova-2-caroselloqa_hddreact-redux-demo1react-misc-toolbox
2.0.2

7 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago