Skip to content

Instantly share code, notes, and snippets.

@zmallen
Created January 20, 2019 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zmallen/5d108d219dc9c2c2980870c27a0c38aa to your computer and use it in GitHub Desktop.
Save zmallen/5d108d219dc9c2c2980870c27a0c38aa to your computer and use it in GitHub Desktop.
05
function isASCII(str) {
return /^[\x00-\x7F]*$/.test(str);
}
for(d in data) {
var m = "";
for(var w=0,c="rozMWeXaXY";w<c.length;w++) {
m=m+String.fromCharCode(c.charCodeAt(w)-d.charCodeAt(w%2));
}
if (isASCII(m)) {
console.log(m);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment