Skip to content

Instantly share code, notes, and snippets.

Last active March 27, 2023 16:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to decrypt Base64 to Plaintext & Viceversa
import base64
base64_message = 'BASE64' # pesan yang ingin di-decode
decoded_message = base64.b64decode(base64_message) # proses decoding
print(decoded_message.decode('utf-8')) # print hasil decoding
Copy link

Base64 Generator


# prompt user for input text
read -p "Enter the plain text to be encoded in base64: " plain_text

# encode the plain text using base64
encoded_text=$(echo -n $plain_text | base64)

# print the encoded text
echo "The base64 encoded text is: $encoded_text"

Copy link

Base64 Decryptor


# prompt user for encoded message
read -p "Enter the base64 message to be decoded: " encoded_message

# decode the base64 message using base64 command
decoded_message=$(echo -n $encoded_message | base64 -d)

# print the decoded message
echo "The decoded message is: $decoded_message"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment