XOR Encrypt is an open-source command-line application written in Rust for simple XOR-based encryption and decryption. It supports encrypting and decrypting text strings as well as files.
- Text Encryption and Decryption: Encrypt or decrypt text directly from the command line.
- File Encryption and Decryption: Process files securely using a given key.
- Cross-Platform: Built with Rust, making it highly portable.
- Lightweight: A simple tool with no unnecessary dependencies.
- Rust and Cargo installed on your system.
- A Linux-based operating system for the installation script.
Run the provided installation script:
./install_linux.sh
This will build the project and place the executable in $HOME/.local/bin
.
To make the xor-encrypt
command accessible from anywhere in the terminal, add $HOME/.local/bin
to your PATH
. You can do this by adding the following line to your shell configuration file (e.g., .bashrc
, .zshrc
):
export PATH="$HOME/.local/bin:$PATH"
Then, reload the shell configuration:
source ~/.bashrc # or source ~/.zshrc for Zsh users
To remove the application, run the uninstall script:
./uninstall_linux.sh
This will remove the installed binary from $HOME/.local/bin
.
Alternatively, you can build the project manually using Cargo:
cargo build --release
The resulting binary will be located in ./target/release/xor-encrypt
.
xor-encrypt [OPTIONS] --operation <OPERATION> --key <KEY>
Option | Description |
---|---|
-o, --operation |
The operation to perform. Possible values: encrypt , decrypt , encrypt-file , decrypt-file . |
-t, --text |
The text to encrypt or decrypt (for text operations). |
-f, --file |
The file to encrypt or decrypt (for file operations). |
-k, --key |
The encryption key (required). |
-h, --help |
Prints help information. |
xor-encrypt -o encrypt -t "Hello, World!" -k mysecretkey
xor-encrypt -o decrypt -t "EncryptedString" -k mysecretkey
xor-encrypt -o encrypt-file -f myfile.txt -k mysecretkey
xor-encrypt -o decrypt-file -f myfile_encrypted.txt -k mysecretkey
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
This project is licensed under the MIT License.
If you encounter any issues or have questions, please check the repository's issues section or contact the maintainers.