Skip to content

Instantly share code, notes, and snippets.

@yuiseki
Last active December 18, 2015 01:29
Show Gist options
  • Save yuiseki/5704158 to your computer and use it in GitHub Desktop.
Save yuiseki/5704158 to your computer and use it in GitHub Desktop.
uuid = require 'node-uuid'
hex1str = uuid.v4().replace(/-/g, "")
hex1buf = new Buffer(hex1str, "hex")
hex2str = uuid.v4().replace(/-/g, "")
hex2buf = new Buffer(hex2str, "hex")
result = new Array()
for i in [0...hex1buf.length]
r = hex1buf[i] ^ hex2buf[i]
result.push r
rbuf = new Buffer(result)
console.log rbuf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment