Hello Monks,
I have a question in regard to a PHP function "XORmask" which I'm not sure how it works in Perl. I suspect the Perl 'unpack' would produce the desired output, but I am not sure how to get there.
The PHP code is:
$id="Z0xcAVtKAwkDHVcKVF5TCQ";
$track = base64_decode($id); #yields "gL\[J W T^S"
$track = $track ^ XORmask; #yields "T|808|586|127800"
I have gotten as far as:
use MIME::Base64;
my $track_decode = decode_base64($id); #yields "gL\[J W T^S"
... but cannot get the Perl equivalent of "$track = $track ^ XORmask;" so I can get to "T|808|586|127800" as the output.
Any help would be greatly appreciated!
In reply to Perl function equivalent to PHP xormask by wubbaducki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |