Bhasker C V wrote: > Hi all, > > I am sure that this is more of a security question and does not > pertain to 'debian', please advice me to re-route this mail to > appropriate list if you are offended. > > I am trying to encode using base64 to get data for SMTP > authentication which i am experimenting upon. I stumbled upon this > issue. I am not sure why this is happening. > > > Say the text to be encoded is "[EMAIL PROTECTED]" > > $ perl > use MIME::Base64; > print encode_base64("[EMAIL PROTECTED]");
The @ is special in strings inside " " in Perl, so you need to escape it writing \@ or use single quotes. > $ echo "[EMAIL PROTECTED]" | openssl base64 And here you're adding a newline character after the address. These two give the same result (which is neither of the ones you got before :- ) ) : $ perl -MMIME::Base64 -e 'print encode_base64("[EMAIL PROTECTED]"); ' aGVscEBiYXNlLmNvbQ== $ echo -n "[EMAIL PROTECTED]" |openssl base64 aGVscEBiYXNlLmNvbQ== -- I love you, not only for what you are, but for what I am when I am with you. -- Roy Croft Eduardo M KALINOWSKI [EMAIL PROTECTED] http://move.to/hpkb -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]