Nik has asked for the wisdom of the Perl Monks concerning the following question:
I made the above script as a test and it works ok but i dont understand how the '^' works to get the original text encrypter after applying the $key. It must be soemthign withe bits i think. Do you know anything more on this?#!/usr/bin/perl $toBeEncrypted = "hi there"; $key = "nikos"; $encrypted = $toBeEncrypted ^ $key; print "encrypted = $encrypted\n"; $decrypted = $encrypted ^ $key; print "decrypted = $decrypted\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple Encryption question
by crashtest (Curate) on Apr 10, 2005 at 21:04 UTC | |
|
Re: Simple Encryption question
by moot (Chaplain) on Apr 10, 2005 at 19:02 UTC | |
| |
|
Re: Simple Encryption question
by cazz (Pilgrim) on Apr 11, 2005 at 00:54 UTC | |
by bart (Canon) on Apr 11, 2005 at 09:17 UTC | |
by polettix (Vicar) on Apr 11, 2005 at 10:34 UTC | |
|
Re: Simple Encryption question
by Joost (Canon) on Apr 10, 2005 at 19:05 UTC | |
|
Re: Simple Encryption question
by zentara (Cardinal) on Apr 11, 2005 at 12:55 UTC |