PDA

View Full Version : Help with webSite...CGI??


dwj100uni
11-22-2005, 06:32 PM
Hi there everyone.

I was wondering if any of you could help me.....

I am creating a small website so that a user can enter some text into a box, and then, using a certain key, the site will encrypt the data and send it back to the user on the next page so they can print it out, etc....

I was just wondering how I can get a program to take the text entered in a text box on a form and convert it (obviously server side) and then send it back to the user on the next page? What do i use? Can i use Java as i know this a bit.

Any help appreciated,

David

FishMonger
11-22-2005, 06:41 PM
client side
http://search.cpan.org/~rsavage/Javascript-MD5-1.05/lib/Javascript/MD5.pm

or

server side
http://search.cpan.org/~gaas/MD5-2.03/MD5.pm
http://search.cpan.org/~gaas/Digest-MD5-2.33/MD5.pm
http://search.cpan.org/~gaas/Digest-1.13/Digest.pm

dwj100uni
11-22-2005, 06:54 PM
Hi there, im pretty simple.... i have read through the explanations of these, but not really sure what they are still, is there any chance you could explain...in leamans terms what these are?

Thanks very much,

David

FishMonger
11-23-2005, 02:26 AM
Here's a very simple example.
#!/usr/bin/perl -w

use Digest::MD5 qw(md5_hex);

$data = 'A line of unknown text';
$digest = md5_hex($data); # create a hexadecimal digest

print $digest;Outputs:2af1b788073c11b149efda57090906ad

FishMonger
11-23-2005, 02:32 AM
You may want to consider using the JavaScript MD5 module (the first link that I posted). The module's documentation has a good example of its usage.