base64 hiccup #12013
Unanswered
kjm1102
asked this question in
Using MicroPython
base64 hiccup
#12013
Replies: 2 comments 11 replies
-
~$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> base64.b64encode( b'0067462314' )
b'MDA2NzQ2MjMxNA=='
>>>
~$ python2
Python 2.7.18 (default, Jul 14 2021, 08:11:37)
[GCC 10.2.1 20210110] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> base64.b64encode( b'0067462314' )
'MDA2NzQ2MjMxNA=='
>>>
~$ I'd say you have to ask THEM how the produce that result. You could also try: ;-) N = bytes((0x00, 0x67, 0x46, 0x23, 0x14))
>>> base64.b64encode(N)
b'AGdGIxQ=' |
Beta Was this translation helpful? Give feedback.
11 replies
-
That's why it's called an AS system. (Artificial Stupidity) Every once in a while it's OK to use one's own brain… |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I base64 encode b'0067462314' I get 'MDA2NzQ2MjMxNA==' but a web encoder (also claiming to be base 64) gives 'AgdGIxQ='. I can't work out how to get this in upython or python. Can someone please point me in the right direction?
Beta Was this translation helpful? Give feedback.
All reactions