Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.52 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.52 KB

obscure64

Package version

This is a base64 based encoder/decoder tool mainly used to obscure base64 encoding to make your data transfer more secure and interesting.

Usage

pip install obscure64

Obfuscated coded data, causing headaches for those who get it.🤕

from obscure64 import Obscure64

ob64 = Obscure64()
result = ob64.encode("Hello World!".encode())
print(result)  # output: b'sgvSBg8Gv29YBgqH'
print(ob64.decode(result))  # output: b'Hello World!'

import base64

print(base64.b64decode(result))  # output: b'\xb2\x0b\xd2\x06\x0f\x06\xbfoX\x06\n\x87'
print(base64.b64encode("Hello World!".encode()))  # output: b'SGVsbG8gV29ybGQh'

And you can make it interesting.🤔

You can pass in 65 emoji of length 1 to map 65 standard base64 characters.

from obscure64 import Obscure64

ob64 = Obscure64(
    b64chars="🙈🙉🙊🐒🐶🐕🐩🐺🐱😹😻😼🙀😿🐈🐯🐅🐴🐎🐮🐂🐃🐄🐷🐖🐗🐽🐑🐐🐪🐘🐭🐀"
             "🐹🐰🐇🐻🐨🐼🐾🐔🐓🐣🐤🐥🐧🐸🐊🐢🐍🐲🐉🐳🐋🐬🐠🐡🐙🐚🐌🐛🐜🐝🐞🦋"
)
result = ob64.encode("Hello World!".encode())
print(result.decode())  # output: 🐎🐩🐃🐥🐑🐩🐛🐀🐃🐬🐜🐲🐑🐩🐅🐹
print(ob64.decode(result))  # output: b'Hello World!'

Projects inspired by this library

Emoji-Chat