“E”-ddress encoder

"So who is the real Mr. Tines? The monster who'd smash a world, or the nice guy I'm hearing now?"
-- The Blabber, Vernor Vingee.

S I T E   M A P

Alas! Either your browser is not one for which I've been able to get XHTML object tags to work, or perhaps it's not Java enabled!





This page contains an applet/Java application that emulates an early version of the Hiveware/Hivelogic “Enkoder” program, one that ran on platforms other than Mac (current official version here). This version emulates the simple XOR masking of the original; but I have modified the scripting so that it uses DOM manipulation, rather than document.write(), which makes it suitable for use in XHTML pages.

Enter your details in the text fields, and then hit “Go!” — this generates a simple HTML page with scripting which can be used as a skeleton for your pages, like this (generated with the default values):

<html><head><title>"E"-ddress encoder framework page</title>
<script type="text/javascript">
var data=new Array(
606,594,602,607,583,604,521,598,
606,594,602,607,627,605,604,580,
603,598,577,598,541,605,602,607,
524,576,582,593,601,598,592,583,
526,615,603,602,576,536,606,594,
602,607,536,602,576,536,594,593,
604,582,583,534,512,626,563,630,
606,594,602,607,531,606,598,530,
563,598,606,594,602,607,527,594,
583,525,605,604,580,603,598,577,
598,527,599,604,583,525,605,602,
607,563
);
function injectEddress(){if(!document.layers){
var m = document.getElementById('mailtag');while(m.firstChild) {m.removeChild(m.firstChild);}
var a = document.createElement('a');
var idx=0, n=data[data.length-1];var mailtext= '';
while( data[idx]!=n ) {mailtext+=String.fromCharCode(data[idx++]^n);}idx++;a.setAttribute('href', mailtext);mailtext= '';
while( data[idx]!=n ) {mailtext+=String.fromCharCode(data[idx++]^n);}idx++;a.setAttribute('title', mailtext);mailtext= '';
while( data[idx]!=n ) {mailtext+=String.fromCharCode(data[idx++]^n);}idx++;a.appendChild(document.createTextNode(mailtext));
m.appendChild(a)};};
</script></head><body>
<p id="mailtag">email &lt;at&gt; nowhere &lt;dot&gt; nil</p>
<script type="text/javascript">injectEddress()</script>
</body></html>

The paragraph with the id attribute of mailtag is modified during the page load, to become:

<p id="mailtag">

    <a title="Email me!" href="mailto:[email protected]?subject=This+mail+is+about%3A"> email&lt;at&gt;nowhere&lt;dot&gt;nil </a>

</p>

The script section in the head should be lifted out into a separate .js file so that it can be referred to from every page, rather than bulking every page up.

The subject is optional and can be left blank, which than omits the “?subject=” clause from the mailto: URL.

The Jar file contains the source as well as the class files. The jar can also be used as a free-standing java application, invoked by

java -cp enkoder.jar com.ravnaandtines.enkoder.Main


Made with Cascading Style Sheets

This document maintained by domain webmaster - tines at ravna and tines dot com.

Material Copyright © 2000-2005 Mr. Tines

S I T E   M A P
Hosted by www.Geocities.ws

1