Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding base 64 encoder #7

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
20 changes: 20 additions & 0 deletions your_projects/base64/base64_encoding_decoding.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import base64


message = "ce qui ne se partage pas se perd"


message_bytes = message.encode('ascii')
base64_bytes = base64.b64encode(message_bytes)


base64_message = base64_bytes.decode('ascii')
print("Encoded Message:", base64_message)


decoded_bytes = base64.b64decode(base64_bytes)
decoded_message = decoded_bytes.decode('ascii')


print("Decoded Message:", decoded_message)