Skip to content

TheCoree/AHC2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AHC v3.0 CLI Tool

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.

Installation

For Linux

  1. Clone the repository:

    git clone https://github.com/TheCoree/AHC2.git
    cd AHC2
  2. Install the package in editable mode:

    pip install -e .

For Windows

  1. Clone the repository:

    git clone https://github.com/TheCoree/AHC2.git
    cd AHC2
  2. 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.

🔧 Usage

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 "ȺȺ⦙⫣⪓⩗⩵⫷ƣ⪻⪓⫣"

Arguments

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)

Examples

Encoding Text

ahc "Hello World!"

Output:

ȺȺ̳ѕққҹƣωҹӗқыƭ

With custom mixing and key:

ahc -m 3 -k 2 "Hello World!"

Output:

ǾǴ˰ВјјѶŠΆѶҔјЈŪ

Decoding Text

ahc -d "ǾǴ˰ВјјѶŠΆѶҔјЈŪ"

Output:

Hello World!

For custom-encoded text:

ahc -d "ǾǴ⥖⪠⩐⨔⨲⪴Š⩸⩐⪠"

Output:

Hello World!

Notes

  • 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, decode in your scripts.

License

This project is licensed under the MIT License.

About

AHC v2.0 CLI Tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages