If you're going to use string xor, why do it a character at a time?
Why indeed?
use MIME::Base64 qw( decode_base64 ); my $orig = decode_base64( $_ ); $orig ^= substr $orig, 1;
And your solution doesn't work. It appends a junk character.
joec_'s explaination didn't say what to do with the last byte so I left it in.
In reply to Re^4: Base64 and byte arrays
by jwkrahn
in thread Base64 and byte arrays
by joec_
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |