Skip to main content

A simple set of functions in python for encoding messages into zero-width characters.

Project description

PyZeroWidth

A simple set of functions in python for encoding messages into zero-width characters.


Installation

With git GitHub:

git clone https://github.com/IrtsaDevelopment/PyZeroWidth.git

With pip PyPi

pip install idev-pyzerowidth





Usage

To import:

from PyZeroWidth import encode
from PyZeroWidth import decode




Encoding Functions

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.

Decoding Functions

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idev-pyzerowidth-1.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

idev_pyzerowidth-1.1.0-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page