Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Encrypt Data

by peacemaker1820 (Pilgrim)
on Feb 14, 2003 at 16:11 UTC ( #235301=perlquestion: print w/replies, xml ) Need Help??

peacemaker1820 has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks...
I need to encrypt my data from a simple HTML form that submits all the data to the perl file. How can I encrypt my data? Do I have to go from perl file to perl or html to perl would work?


Replies are listed 'Best First'.
Re: Encrypt Data
by jasonk (Parson) on Feb 14, 2003 at 16:15 UTC

    Your question isn't very clear, but it appears you are trying to encrypt the data from a web form being submitted to a perl CGI, if that is the case all you need to do is make sure the form's ACTION specifies an https (s for secure) URL, and that your webserver supports SSL.

Re: Encrypt Data
by fuzzyping (Chaplain) on Feb 14, 2003 at 16:17 UTC
    Sorry, you're a little short on details. Are you trying to encrypt the data on the filesystem? From the browser to the server? Within the process?

    I'm assuming you just want the data (say, a credit card number) encrypted from the browser. If that's the case, the easiest solution is not a Perl solution at all... use HTTPS. Mod_ssl works quite well. Install it, and then force an SSLRequireSSL directive on the script/page/directory using Apache.

    Hope this helps.

      Yes you got it that's exactly what i am trying to do. Sorry, for my short info. I didn't quiet get what you wrote. Can you please include a more thorough explanation.
      Thank you.
        Install mod_ssl on your Apache webserver. Configure the directory that your script is in to use SSL with the SSLRequireSSL directive. Here is a sample block from my server:
        <Directory "/var/www/perl"> Options FollowSymLinks AllowOverride All SSLRequireSSL Order allow,deny Allow from all AuthType Basic AuthName "Sample encrypted stuff" AuthUserFile conf/users Require valid-user </Directory>
        As you can see, I'm using basic (plaintext) authentication using the htpasswd utility and password file. Hope this helps.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://235301]
Approved by Paladin
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2020-12-03 20:40 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (57 votes). Check out past polls.