crypt10.htm
78f4ab09ea63b7962312d94b6214d895f11713d7036f343bff0c1770da086ca1
<html>
<head>
<title>E-HACK's WilterCrypt v1.0</title>
<script language="JavaScript">
<!-- Hide from shitty browsers
/**********************************\
* E-HACK's WilterCrypt v1.0 *
* JavaScript Crypto-System *
* *
* © 1997 ehack@wilter.com *
* http://www.ilf.net/wilter/ehack/ *
* Feel free to use this script on *
* your pages, but you must leave *
* this header in the source *
* Do not modify this in any way *
* Long Live Wiltered Fire! *
\**********************************/
function Cypher(form) {
var Ret = crypt (form.textarea1.value, form.key.value)
form.textarea2.value = Ret
}
/*I'm still working on a way to make it so the key can be
something other than the numbers 1 to 63, it was easier to
make it work with these numbers because of the number of letters
numbers and characters that this will accept, the only punctuation
it allows is a period, it also does not yet allow for spaces, I'm
workin' on it. this is the most difficult JavaScript that I've written.
*/
function crypt (OriginalString, CipherValue) {
Ref="0123456789abcdefghijklmnopqrstuvwxyz._~ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CipherValue = parseInt(CipherValue)
var Temp=""
for (Count=0; Count < OriginalString.length; Count++) {
var TempCharicter = OriginalString.substring (Count, Count+1)
var Conv = yeah(TempCharicter)
var Cipher=Conv^CipherValue
Cipher=that(Cipher)
Temp += Cipher
}
return (Temp)
}
function yeah (Charicter) {
return (Ref.indexOf(Charicter));
}
function that (Val) {
return (Ref.substring(Val, Val+1))
}
function Directions()
{
alert("DIRECTIONS:\rEnter text into the \"Input box\", choose a key between 1 and 63"
+ " enter it into the \"key box\", click the \"CRYPT\" button and your"
+ " cyphertext will show up in the \"Output box\"");
}
function About()
{
alert("\rWilterCrypt v1.0\r© 1997 E-HACK\rehack@wilter.com"
+ "\r http://www.ilf.net/wilter/ehack/");
}
// end hiding-->
</script>
</head>
<body>
<center>
<h1>E-HACK's WilterCrypt v1.0</h1>
</center>
<br><hr><br>
Ok, here's WilterCrypt v1.0 a JavaScript crypto-system, its fairly weak, and
only allows keys from 1 to 63 and only allows the following charicters:<br>
0123456789abcdefghijklmnopqrstuvwxyz._~ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>
This script really needs some improvement, v1.1 and 1.2 are a little better in
that they allow spaces, but the number of charicters is still really low, and
the method of encryption (basically a weak XOR) isn't very strong (and the
number of keys makes it no trouble to crack) I hope v2.0 will be <i>much</i>
more secure and allow for letters to be used in the key, and be a much stronger
overall encryption method, but I still need to learn more about cryptography
and JavaScript before I'll be able to do that(I've been messing around with
other methods of encryption and should have one fairly soon). Well, have fun,
<br>Thanks,<br>E-HACK<br><br><a href="index.html">Back to my JavaScripts page</a>
<br><hr><br>
<!--BEGIN FORM FOR WILTERCRYPT-->
<center>
<table border=5 width=90%>
<th>
WilterCrypt v1.0 By: <a href="mailto:ehack@wilter.com">E-HACK</a>
</th>
<tr><td align=center>
<form name="wiltercrypt">
Input:<br>
<textarea rows=5 cols=60 name="textarea1">
</textarea>
</td></tr>
<tr><td align=center>
Output:<br>
<textarea rows=5 cols=60 name="textarea2">
</textarea>
</td></tr>
<tr><td align=center>
Key:<input type="text" name="key" size=4 value="">
<input type="button" name="button" value=" CRYPT " onClick="Cypher(this.form)">
<input type="reset" value=" CLEAR ">
<input type="button" name="directions" value=" DIRECTIONS " onClick="Directions()">
<input type="button" name="about" value=" ABOUT " onClick="About()">
</form>
</td></tr>
</table>
</center>
<!--END FORM FOR WILTERCRYPT-->
<br><br>
Source for WilterCrypt v1.0
<br>
<form><textarea rows=10 cols=65>
<html>
<head>
<title>Title of your page</title>
<script language="JavaScript">
<!-- Hide from shitty browsers
/**********************************\
* E-HACK's WilterCrypt v1.0 *
* JavaScript Crypto-System *
* *
* © 1997 ehack@wilter.com *
* http://www.ilf.net/wilter/ehack/ *
* Feel free to use this script on *
* your pages, but you must leave *
* this header in the source *
* Do not modify this in any way *
* Long Live Wiltered Fire! *
\**********************************/
function Cypher(form) {
var Ret = crypt (form.textarea1.value, form.key.value)
form.textarea2.value = Ret
}
/*I'm still working on a way to make it so the key can be something
other than the numbers 1 to 63, it was easier to make it work with
these numbers because of the number of letters numbers and characters
that this will accept, the only punctuation it allows is a period, it
also does not yet allow for spaces, I'm workin' on it.
*/
function crypt (OriginalString, CipherValue) {
Ref="0123456789abcdefghijklmnopqrstuvwxyz._~ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CipherValue = parseInt(CipherValue)
var Temp=""
for (Count=0; Count < OriginalString.length; Count++) {
var TempCharicter = OriginalString.substring (Count, Count+1)
var Conv = yeah(TempCharicter)
var Cipher=Conv^CipherValue
Cipher=that(Cipher)
Temp += Cipher
}
return (Temp)
}
function yeah (Charicter) {
return (Ref.indexOf(Charicter));
}
function that (Val) {
return (Ref.substring(Val, Val+1))
}
function Directions()
{
alert("DIRECTIONS:\rEnter text into the \"Input box\", choose a key between 1 and 63"
+ " enter it into the \"key box\", click the \"CRYPT\" button and your"
+ " cyphertext will show up in the \"Output box\"");
}
function About()
{
alert("\rWilterCrypt v1.0\r© 1997 E-HACK\rehack@wilter.com"
+ "\r http://www.ilf.net/wilter/ehack/");
}
// end hiding-->
</script>
</head>
<body>
YOUR PAGE HERE...put the form
for WilterCrypt anywhere on
your page that you want
<!--BEGIN FORM FOR WILTERCRYPT-->
<center>
<table border=5 width=90%>
<th>
WilterCrypt v1.0 By: <a href="mailto:ehack@wilter.com">E-HACK</a>
</th>
<tr><td align=center>
<form name="wiltercrypt">
Input:<br>
<textarea rows=5 cols=60 name="textarea1">
</textarea>
</td></tr>
<tr><td align=center>
Output:<br>
<textarea rows=5 cols=60 name="textarea2">
</textarea>
</td></tr>
<tr><td align=center>
Key:<input type="text" name="key" size=4 value="">
<input type="button" name="button" value=" CRYPT " onClick="Cypher(this.form)">
<input type="reset" value=" CLEAR ">
<input type="button" name="directions" value=" DIRECTIONS " onClick="Directions()">
<input type="button" name="about" value=" ABOUT " onClick="About()">
</form>
</td></tr>
</table>
</center>
<!--END FORM FOR WILTERCRYPT-->
yeah, you can have stuff after the form too
</textarea>
<br>
<h3>© 1997 E-HACK (<a href="mailto:ehack@wilter.com">ehack@wilter.com</a>)
<br><br><br><br><br><br><br><br><br><br><br><br><br>
</body>
</html>