in reply to Re^6: STDERR Restore after redirect
in thread STDERR Restore after redirect

Why would prepending  "AUTH PLAIN " to the encoded string leave the encoding unchanged so that decoding would remain symmetric?

c:\@Work\Perl\monks>perl -wMstrict -le "use MIME::Base64; ;; use Data::Dump qw(pp); ;; my $encoded = encode_base64('Aladdin:open sesame'); ;; my $decoded = decode_base64($encoded); print qq{A: '$decoded'}; ;; $encoded = 'AUTH PLAIN ' . $encoded; $decoded = decode_base64($encoded); print 'B: ', pp $decoded; " A: 'Aladdin:open sesame' B: pack("H*","0144c73cb0083505b1859191a5b8e9bdc195b881cd95cd85b594")

Update: And yes, this does look like a bit of a new topic...


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^8: STDERR Restore after redirect
by tultalk (Monk) on Apr 29, 2018 at 02:45 UTC

    Hi. Thanks.

    Why would prepending "AUTH PLAIN " to the encoded string leave the encoding unchanged so that decoding would remain symmetric?

    Because I was not paying attention. Fixed