#!/usr/bin/perl -w use strict; $| = 1; use CGI; use My::Crypt; my $q = CGI->new; print $q->header(); my $text = $q->param('text' ); my $cipher = $q->param('cipher'); my $crypt = My::Crypt->new( 'debug' => 0 ); if ($q->param('action') eq 'encrypt') { my $enc = $crypt->encrypt($text, $cipher); print qq~
~; } if ($q->param('action') eq 'decrypt') { my $dec = $crypt->decrypt($text, $cipher); print "'$text' is decrypted: $dec\n"; } __END__ # // {%WRAPPER _|EQ|_ "_c_doc__w_plain.txt"%} # // {%PREVENT_LAYOUT_PROCESS _|EQ|_ "0"%} # #