Created
June 20, 2016 18:07
-
-
Save SpEcHiDe/778dbdb2b8afe8fa648dfe293b839e7f to your computer and use it in GitHub Desktop.
Code Obfuscator
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
<!-- textfield to accept input --> | |
<input type="text" id="f1"> | |
<!-- div to show the output --> | |
<div id="f2"></div> | |
<button type="button" onclick="dothis()">Obfuscate</button> | |
<script> | |
var dothis = function(){ | |
// create an array of the input value | |
var values = document.getElementById('f1').value.split(''); | |
for(var i = 0; i < values.length; i++){ | |
// for each character in the input | |
document.getElementById('f2').innerHTML += values[i].charCodeAt(0) + ","; | |
// replace it with it's corresponsing ASCII code | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment