The Encoder and Decoder applets pass a string to and from an HTML FORM field. Typically this is a textarea form field, text, or hidden form field. Once the string is passed it can be handled routinely with the form data, such as with a Perl call to the $ENV variable.
The only requirement is that the string remain intact. If someone encodes a password, for example, the Encoder applet scrambles the password into the longer encoded string. When the encoded string is to be decoded it must be the same with the exception the decoder will strip off leading and trailing white spaces as which are sometimes passed in a 'copy n paste' operation.
The applet code added to a web page for the Encoder applet looks like this:
The attributes of this html applet tag are as follows.
code is the name of the Java class file called.
codebase is the URL where the Java class file is stored. In this example it has been placed in a directory labeled 'classes'. A full URL can be used just as easily, for example codebase = "http://www.orderformcity.com/classes/". The codebase can also be on a floppy or C drive, such as 'file://A/:xyz/misc/classes/' which is useful when calling the Decoder program and to keep it isolated for security purposes. That way the floppy (or CD) must be inserted to access the decoder.
width and height This drives some people bonkers but applets cannot be invisible and must be assigned space on the web page, the minimum being 1 x 1 pixel.
This is not negotiable. The Java code calls the message to encode directly from the form element here called MESSAGE. The Java code is compiled with that variable in the code named MESSAGE. The name of the html form, here called WEB_FORM, is also compiled in the Java code and it too must be supplied when the Java code is compiled. Either that or the web page author can use the default names of WEB_FORM and MESSAGE.
For example, the html form code included with this example is:
Notice the form element is a textarea. It can be hidden field just as easily.
Once the data has been assigned to the form field it can be called or reassigned typically, such as with a Perl call to the $ENV variable.
The Decoder applet is handled in the same way as the Encoder applet:
All of the applet code attribute information for the Encoder applet, listed above, applies here, to the Decoder. The only difference is the class file name, 'PXdcd.class' and the document object name, 'deltaClass
This Zip Package
Typically the Encoder and Decoder are on separate web pages. The Decoder page may even be generated with Perl script, for example, and the codebase to the applet class file is on a floppy.
Note: This demo is not recommended for permanent use. This package is available free to anyone online and the Encryption/Decryption algorithm is the same to whomever has downloaded this package. It is highly recommended that you order a customized algorithm for your applied set of Encoder/Decoder software. Any code you develop with this demo software can be used with your customized version that will have your own unique algorithm.