9-Layer unbreakable encoding system by KAWSAR — base64+marshal+XOR+Sbox+shuffle+KAWSARCODEX+KAWSARV1+KAWSAR2+KAWSAR
Project description
kawsarxencode
9-Layer Unbreakable Encoding System — by KAWSAR
pip install kawsarxencode
Encoding Layers
| Layer | Name | Method |
|---|---|---|
| 1 | base64 | Standard binary → text baseline |
| 2 | marshal | Bytecode-style binary packing |
| 3 | XOR | Dynamic SHA-512 key schedule |
| 4 | S-box | 256-byte substitution cipher |
| 5 | obfuscation | Position shuffle (LCG-based) |
| 6 | KAWSARCODEX | Custom 2-char symbol map |
| 7 | KAWSARV1 | Bitwise rotate-3 + XOR |
| 8 | KAWSAR2 | 16-byte block transposition |
| 9 | KAWSAR | Custom-alphabet base64 + HMAC-SHA256 |
Quick Start
from kawsarxencode import encode, decode
enc = encode("Hello World", key="MySecret")
dec = decode(enc, key="MySecret").decode()
print(dec) # Hello World
Python File Encoder
Encode any .py file so the output contains only one import:
from kawsarxencode import encode_python
encode_python("myapp.py", "myapp_encoded.py", key="MySecret")
The encoded file looks like this:
import kawsarxencode
kawsarxencode.run_encoded(
'<encoded_payload>',
'MySecret',
)
Running the encoded file decodes and executes the original code automatically.
To restore the original file:
from kawsarxencode import decode_python
decode_python("myapp_encoded.py", "myapp_restored.py", key="MySecret")
CLI Usage
# Encode text
kawsarxencode encode "Hello World" --key MySecret
# Decode text
kawsarxencode decode "KX..." --key MySecret
# Encode any file
kawsarxencode encode-file myfile.txt myfile.kx --key MySecret
# Decode any file
kawsarxencode decode-file myfile.kx myfile.txt --key MySecret
# Encode a Python file (single-import output)
kawsarxencode encode-py myapp.py myapp_enc.py --key MySecret
# Restore encoded Python file
kawsarxencode decode-py myapp_enc.py restored.py --key MySecret
# Generate a secure random key
kawsarxencode genkey --length 48
# Show layer info
kawsarxencode info
API Reference
from kawsarxencode import (
KawsarXCipher, # Core cipher class
encode, # Encode str/bytes
decode, # Decode to bytes
encode_file, # Encode any file
decode_file, # Decode any file
encode_python, # Encode .py file (single-import output)
decode_python, # Restore encoded .py file
run_encoded, # Runtime executor (used by encoded files)
generate_key, # Generate secure key
verify_integrity, # Verify encoded string
)
License
MIT — Created by KAWSAR
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
kawsarxencode-1.0.3.tar.gz
(10.2 kB
view details)
File details
Details for the file kawsarxencode-1.0.3.tar.gz.
File metadata
- Download URL: kawsarxencode-1.0.3.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f22ad6576a63e5c9edfc75ec9795d28fdeb36fe7bb182f37e502decb9fee3bd
|
|
| MD5 |
fee9bc728bb26505372d64b86c8c99d3
|
|
| BLAKE2b-256 |
5b7d6745c1e8452fea578a5b6372153da06ad069fca2ba397ec725fded2f030c
|