Why the inconsistent of those two base64 methods?

L

Leo Jay

I'd like to encode a string in base64, but I found a inconsistent of
two methods:


as you can see, the result of
'aaa'.encode('base64')
has a '\n' at the end, but the other method doesn't.

Why the inconsistent?
Thanks.
 
M

Maarten

I'd like to encode a string in base64, but I found a inconsistent of
two methods:

'YWFh'

as you can see, the result of
'aaa'.encode('base64')
has a '\n' at the end, but the other method doesn't.

Why the inconsistent?

Don't know. Does it matter?
'aaa'

(so far so good, and as expected)
'aaa'

(As far as I can see, both methods are completely consistent)

Maarten
 
M

Mensanator

Don't know. Does it matter?
Yeah...
False



'aaa'

(so far so good, and as expected)


'aaa'

(As far as I can see, both methods are completely consistent)

Your notion of 'consistency' is wanting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top