in reply to Encrypt web form values

Crypt::RC4 is something fast and encrypted strings can be base64encoded to be put into a hidden field. You can then decode the hidden field on every cgi run.

You can sort of hide the key from casual eyes, with some code like:

my $password = pack('C*', (0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef));
#!/usr/bin/perl use strict; use warnings; use Crypt::RC4; use MIME::Base64; my $key = "abcdefghijklm"; my $plaintext = "Hello, World!"; my $encrypted = RC4($key, $plaintext); my $encoded = encode_base64($encrypted); my $decoded = decode_base64($encoded); print "$encoded\n"; print "$decoded\n"; my $decrypted = RC4($key, $decoded); print "$decrypted\n";

I'm not really a human, but I play one on earth Remember How Lucky You Are

Replies are listed 'Best First'.
Re^2: Encrypt web form values
by Anonymous Monk on Dec 06, 2008 at 01:40 UTC
    I like your simple solution using Crypt::RC4. Thanks!