basiblaster
|
Posted: Tue Dec 17, 2019 8:57 am Post subject: need help for encrypter |
|
|
I am trying to create a encrypting program. i am trying to create the letter-number script right now so that i can change the values by a set amount later.
<HTML>
<h1>
encryption shit
</h1>
<br>
<p1>
encryption key (10 NUMBERS long):
</p1>
<input type=text style="width:500px" id="key">
<br>
<br>
<p1>
input text (what you want to encrypt):
</p1>
<br>
<br>
<input type="text" style="height:200;width:500" id="input">
<br>
<input type="button" value="encrypt" onClick=encrypt()>
<script>
function encrypt() {
//input from HTML
var key = document.getElementById("key").value ;
var input = document.getElementById("input").value ;
//determin how many times to run the loop
var string = input.length ;
//other vars
var index ;
var output ;
//letter to number loop
while (string<0){
var en1 = input.charCodeAt(index) ;
string-1 ;
index+1 ;
output.push(en1) ;
}
//write output to HTML
document.getElementById("output").innerhtml=output ;
}
</script>
<br>
<br>
<p1 id=output>
output goes here!
</p1>
</HTML> |
|
|