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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file idev-pyzerowidth-1.1.0.tar.gz
.
File metadata
- Download URL: idev-pyzerowidth-1.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d520453d5a70555eba6c8b25d663aa20c0fe316b36f4a92612d4259c3066ca3a |
|
MD5 | 29356d05812dc45f4a09a9cabca643e5 |
|
BLAKE2b-256 | d1238d92c7e5b1aa80c296bd9f15b5c0f42a26c97995f5b72fe937f55acc00df |
File details
Details for the file idev_pyzerowidth-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: idev_pyzerowidth-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a15d15e3002c80a8425b5341f1242e076606a5f01bca3599db7bafbfacb69522 |
|
MD5 | 71d926b5b6c1bc1f4cc3dafd8d311d50 |
|
BLAKE2b-256 | 2f6e35317d0f473801af922141fd17b6fa34fd099f9b8678e2ecdf599d5b7c38 |