Skip to content
Snippets Groups Projects
Commit 8ef648c8 authored by Someshwaran R's avatar Someshwaran R :ghost:
Browse files

Encode and Decode

parent 22c288f2
No related branches found
No related tags found
No related merge requests found
b64.txt 0 → 100644
#! /usr/bin/python
#print("bas64 by SNA")
import base64
import sys
if(len(sys.arg) !=3):
print("Usage: b64 {-e|-d} \"<string>\"")
exit(-1)
path = sys.argv[0]
option = sys.argv[1]
data = sys.argv[2]
if option == "-d":
print(base64.b64decode(data.encode()).decode())
elif option == "-e":
print(base64.b64encode(data.encode()).decode())
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment