This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ammar2
Recipients ammar2, kwatsen
Date 2021-01-27.16:59:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611766787.0.0.0117556601513.issue42628@roundup.psfhosted.org>
In-reply-to
Content
It seems to me that your commands are just sequenced wrong, in Python you're performing (examples in parens):

* base64 (ue==) -> decode to binary (0xB9)
* binary (0xB9) -> encode to base64 (uQ==)

whereas in your command line commands you're doing:

* base64 (ue==) -> encode to double base64 (dWU9PQo=)
* double base64 (dWU9PQo=) -> decoded to base64 (ue==)


If we do the same thing on the command line as you're doing in Python, we get:

$ echo "base64encodedvalue==" | base64 -d | base64
base64encodedvaluQ==

$ echo "ue==" | base64 -d | base64
uQ==

$ echo "base64encodedvalue==" | openssl enc -d -base64 -A | openssl enc -base64 -A
base64encodedvaluQ==
History
Date User Action Args
2021-01-27 16:59:47ammar2setrecipients: + ammar2, kwatsen
2021-01-27 16:59:47ammar2setmessageid: <1611766787.0.0.0117556601513.issue42628@roundup.psfhosted.org>
2021-01-27 16:59:46ammar2linkissue42628 messages
2021-01-27 16:59:46ammar2create