A simple set of functions in python for encoding messages into zero-width characters.
With git
GitHub:
git clone https://github.com/irtsa-dev/PyZeroWidth.git
With pip
PyPi
pip install idev-pyzerowidth
To import:
from PyZeroWidth import encode
from PyZeroWidth import decode
encode.binary8(message: str, secret: str, encoding: str = 'utf') -> str
encode.binary16(message: str, secret: str, encoding: str = 'utf') -> str
encode.binary24(message: str, secret: str, encoding: str = 'utf') -> str
# Encoding functions that encodes the 'secret' into binary, then into corresponding zero-width characters depending on the encoding provided.
# Binary8 can represent the first 256 (0-255) characters in the encoding codec provided.
# Binary16 can represent the first 65536 (0-65535) characters in the encoding codec provided.
# Binary24 can represent the first 16777216 (0-16777215) characters in the encoding codec provided.
encode.trinary6(message: str, secret: str, encoding: str = 'utf') -> str
encode.trinary11(message: str, secret: str, encoding: str = 'utf') -> str
encode.trinary16(message: str, secret: str, encoding: str = 'utf') -> str
# Encoding functions that encodes the 'secret' into trinary, then into corresponding zero-width characters depending on the encoding provided.
# Trinary6 can represent the first 256 (0-255) characters in the encoding codec provided.
# Trinary11 can represent the first 65536 (0-65535) characters in the encoding codec provided.
# Trinary16 can represent the first 16777216 (0-16777215) characters in the encoding codec provided.
encode.quaternary4(message: str, secret: str, encoding: str = 'utf') -> str
encode.quaternary8(message: str, secret: str, encoding: str = 'utf') -> str
encode.quaternary12(message: str, secret: str, encoding: str = 'utf') -> str
# Encoding functions that encodes the 'secret' into quaternary, then into corresponding zero-width characters depending on the encoding provided.
# Quaternary4 can represent the first 256 (0-255) characters in the encoding codec provided.
# Quaternary8 can represent the first 65536 (0-65535) characters in the encoding codec provided.
# Quaternary12 can represent the first 16777216 (0-16777215) characters in the encoding codec provided.
decode.binary8(message: str, encoding: str = 'utf') -> str
decode.binary16(message: str, encoding: str = 'utf') -> str
decode.binary24(message: str, encoding: str = 'utf') -> str
# Decoding functions that decodes the 'message' attempting to find zero-width characters encoded in a binary format.
# Binary8 will expect the message to be encoded using the binary8 encode function and as such characters being represented with 8 digits.
# Binary16 will expect the message to be encoded using the binary16 encode function and as such characters being represented with 16 digits.
# Binary24 will expect the message to be encoded using the binary24 encode function and as such characters being represented with 24 digits.
decode.trinary6(message: str, encoding: str = 'utf') -> str
decode.trinary11(message: str, encoding: str = 'utf') -> str
decode.trinary16(message: str, encoding: str = 'utf') -> str
# Decoding functions that decodes the 'message' attempting to find zero-width characters encoded in a trinary format.
# Trinary6 will expect the message to be encoded using the trinary6 encode function and as such characters being represented with 6 digits.
# Trinary11 will expect the message to be encoded using the trinary11 encode function and as such characters being represented with 11 digits.
# Trinary16 will expect the message to be encoded using the trinary16 encode function and as such characters being represented with 16 digits.
decode.quaternary4(message: str, encoding: str = 'utf') -> str
decode.quaternary8(message: str, encoding: str = 'utf') -> str
decode.quaternary12(message: str, encoding: str = 'utf') -> str
# Decoding functions that decodes the 'message' attempting to find zero-width characters encoded in a quaternary format.
# Quaternary4 will expect the message to be encoded using the quaternary4 encode function and as such characters being represented with 4 digits.
# Quaternary8 will expect the message to be encoded using the quaternary8 encode function and as such characters being represented with 8 digits.
# Quaternary12 will expect the message to be encoded using the quaternary12 encode function and as such characters being represented with 12 digits.