AHC - ASCII Hyper Coder - is a CLI tool for encoding and decoding messages using a character shifting algorithm. The tool embeds the mixing and key values directly into the encoded text for seamless decryption without needing to specify them manually.
-
Clone the repository:
git clone https://github.com/TheCoree/AHC2.git cd AHC2 -
Install the package in editable mode:
pip install -e .
-
Clone the repository:
git clone https://github.com/TheCoree/AHC2.git cd AHC2 -
Install the package in editable mode:
pip install -e .
After installation, you can run the tool using the ahc command from anywhere. Alternatively, run it as a module with python -m ahcoder.
The tool supports encoding by default and decryption with the --decrypt flag. Mixing and key values (1-9) are required only for encoding and are automatically extracted during decryption.
Examples:
ahc "Hello world"
ahc -m 3 -k 2 "I use ahc, btw"
ahc -d "ȺȺ⦙⫣⪓⩗⩵⫷ƣ⪻⪓⫣"| Flag | Short | Description |
|---|---|---|
--decrypt |
-d |
Decrypt the provided text (auto-extracts mixing and key from embedded header) |
--mixing |
-m |
Mixing value for encoding (1-9, default: 9) |
--key |
-k |
Key value for encoding (1-9, default: 9) |
ahc "Hello World!"Output:
ȺȺ̳ѕққҹƣωҹӗқыƭ
With custom mixing and key:
ahc -m 3 -k 2 "Hello World!"Output:
ǾǴ˰ВјјѶŠΆѶҔјЈŪ
ahc -d "ǾǴ˰ВјјѶŠΆѶҔјЈŪ"Output:
Hello World!
For custom-encoded text:
ahc -d "ǾǴ⥖⪠⩐⨔⨲⪴Š⩸⩐⪠"Output:
Hello World!
- The encoded output includes a 2-character header embedding the mixing and key values (encoded with fixed defaults for security).
- Supports Unicode characters, but ensure input text uses characters with ordinal values that won't exceed Unicode limits (0-1114111) after shifting. ASCII text is safest.
- If errors occur (e.g., invalid range or overflow), the tool will display a helpful message.
- For development: The code is modular (encoder.py, decoder.py, cli.py). Import functions like
from ahcoder import encode, decodein your scripts.
This project is licensed under the MIT License.