Skip to content

Instantly share code, notes, and snippets.

@hpainter
Created October 7, 2015 12:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hpainter/2a05a5fa7f70880ff6fe to your computer and use it in GitHub Desktop.
Save hpainter/2a05a5fa7f70880ff6fe to your computer and use it in GitHub Desktop.
function (sInput){
var sOutput='';
for(var i=0,c=sInput.length;i<c;i++){
var nChar=sInput.charCodeAt(i);
if(nChar>=33&&nChar<=126){
sTmp=String.fromCharCode(33+(((nChar-33)+47)%94));
sOutput+=sTmp
}else{
sOutput+=sInput.charAt(i)
}
}
return sOutput
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment