Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
4

Base64 Encoder and Decoder

Babbel
Babbel

Hi guys!

Here's a Base64 Encoder and Decoder I created.

(Base64? Can you eat that?)

Since it's easy to use, I haven't written any examples. But if you don't know how to use it, feel free to ask me.

If there are any problems with the code, please report them in the comments!

4 years ago

Voters

Comments

TopNew
1
PYer
PYer

How did you manage to use the replit module? When I try it says that there is no replit module.

4 years ago
1
Babbel
Babbel

@fullern000
i know that problem. For some reason, you can't use it in project mode

4 years ago
1
21natzil
21natzil

You forgot to add the "=" to the end, not sure how important that is, but python's base64.b64encode does it.

4 years ago
1
Babbel
Babbel

@21natzil
it isn't needed there, because the program gets them via index. 6 bit numbers go from 0 (A) to 63 (/). '=' would have the index 64, which means that it couldn't be used. But otherwise you would be right.

4 years ago
1
Corsaka
Corsaka

Never would've thought of using replit.clear() and a break. I personally use sys.exit(), but yours is a much cleaner and faster method. Take my updoot!

4 years ago
1
Babbel
Babbel

@Corsaka
thank you very much! Didn't even know this is faster.

4 years ago
Load more