A simple text encoder: EZ Encode
Project description
EZ Encode is a simple custom encoder that has a two layer encoding mechanism which makes it a bit more secure. Though, the conecpt could be improved upon it works really well.
Example:
# import the ezencode classe
from EZencode.ezencode import ezencode
# Generate some text to encode
data = "Hello, world! The encoder and decoder really works. \n\n"
# Encode the data
encoded = ezencode(data).encode() # encode and store the encoded data
# Decode the data
decoded = ezencode(encoded).decode() # decode and store the decoded data
print("Encoded: ", encoded, end="\n") # print the encoded data
print("Decoded: ", decoded, end="\n") # print the decoded data
# The code shown above is the typical usage of ezencode
# The code below is a special use case and is not always necessary
# Encode the encoded data as bytes and write it to a file
#
# encoded = ezencode(data).encode(as_bytes=True, write_out=True)
#
# The file name will be ./ezencode-seconds.bin
# To decode the data, just read the file contents and use
# ezencode's decode method to decode the data
#
# with open('./ezencode-seconds.bin', 'rb') as bin_file:
# data = bin_file.read()
# decoded = ezencode(data).decode()
#
# Then, print the decoded data
# print(decoded)
# Command Line usage
ezencode [-b -h -w] -d|-e *DATA*
# Getting help
ezencode -h
# Typical usage
encoded="$(ezencode -e "Hello")"
decoded="$(ezencode -d "$encoded")"
# Writing encoded data as is to a file
ezencode -w -e "Hello, world"
# Writing encoded data as bytes to a file
ezencode -b -w -e "Hello, world"
# Decoding encoded data from file
data="$(cat ./ezencode-SECONDS.bin)"
ezencode -d "$data"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ezencode-0.8-py3-none-any.whl.
File metadata
- Download URL: ezencode-0.8-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ac54d43561a2e764968c63b0416f6740ba02fd9cd1d916ddb07f6148e2d783
|
|
| MD5 |
fd078120499c59d8e95b37a3a329edaf
|
|
| BLAKE2b-256 |
6178b341b6eeca0b4e84648451fc06a9c25a06a3f99a377bceffe795641d4363
|