Skip to content

Instantly share code, notes, and snippets.

View guillermodoghel's full-sized avatar
🇦🇷
⭐️⭐️⭐️

guillermodoghel

🇦🇷
⭐️⭐️⭐️
View GitHub Profile
@guillermodoghel
guillermodoghel / xor_strings.js
Created April 23, 2018 14:40 — forked from ril3y/xor_strings.js
Simple Javascript String XOR utility
var xor_str = function(s,K)
{
c = '';
for(i=0; i<str.length; i++) {
for(ik=0; ik<K.length; ik++){
c += String.fromCharCode(str[i].charCodeAt(0).toString(10) ^ key.charCodeAt(0).toString(10)); // XORing with letter 'K'
}
}
return c;
}