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

is there such a thing in perl that can encrypt and decrypt html tags? this may add more security with regards to html coding.

Replies are listed 'Best First'.
Re: html tag encryptor/decryptor
by Cybercosis (Monk) on May 03, 2000 at 10:10 UTC
    What could you possibly do in HTML that would present a security risk that doesn't involve putting passwords in the comments or miscalling CGI scripts? Besides, encrypting HTML would make it un-parse-able for a browser.
Re: html tag encryptor/decryptor
by chromatic (Archbishop) on May 03, 2000 at 07:11 UTC
    Some good cryptography modules are found in Digest-MD5 from CPAN. I like Digest::MD5, personally.

    Of course, the encryption has to be undone to be displayed in a browser. Unless you're programming for a specific plugin which has the appropriate decryption keys or algorithms, people will be able to see your HTML anyway, at some point.

    In my opinion, it's not worth the trouble as any security it will give you is more for show than effect.

Re: html tag encryptor/decryptor
by turnstep (Parson) on May 03, 2000 at 06:10 UTC
    Why would you want to do that? If you change anything but the case of a tag, it will not disply on the browser. What do you mean by "security with regards to html coding"?
RE: html tag encryptor/decryptor
by Adam (Vicar) on May 03, 2000 at 06:57 UTC
    There exists the 'crypt' function, but no inverse version.

    It's used primarily for password stuff, where you only need to see if the user knows the right source, and no one (sort of) can figure it out from the resultant version. I doubt this is what you want. I suppose you are trying to mask the url in a link or something, that's relatively easy (but off topic). But any user with half a brain can still figure out what the link points to just by following it, or bookmarking it and then checking the bookmark file (or numerous other methods)... So I don't think I understand the reason for your query. I suppose you could use Perl to drive a PKI program to do your encryption/decryption. Or something of the like.