Last active
December 18, 2015 01:29
-
-
Save yuiseki/5704158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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