KTXGuard is a minimal tool built with Ktor (Kotlin 100%). It leverages the power of Kotlin for back-end services and provides robust encryption utilities without external library and without any internet request. (educational purpose only)
- Robust encryption utilities including AES, DES, and RSA.
- Command-line interface tools for easy management.
- Dependency Injection with Koin for easy management and scalability.
- Unit tests with Kotlin test framework.
- Java JDK 18 or later
- Kotlin version 1.9.10
-
Clone the repository
git clone https://github.com/YourUsername/KtxGuard.git
-
Navigate to the repository
cd KTXGuard
-
Navigate to the repository
./gradlew build
markdown Copy code
To effectively use our tool, you need to familiarize yourself with the available command-line options:
The algorithm for encryption or decryption is specified with -a
or --algorithm
. Currently, the supported algorithms are:
rsa
aes
des
For example:
-a aes
To encrypt a string:
-e "Your String Here" -a ALGORITHM -p PASSWORD
To decrypt a string:
-d "Encrypted String Here" -a ALGORITHM -p PASSWORD
To encrypt a file:
-ef /path/to/your/file.txt -a ALGORITHM -p PASSWORD
To decrypt a file:
-df /path/to/encrypted/file.txt -a ALGORITHM -p PASSWORD
If you'd like to specify an output file for your encrypted or decrypted content, use the -o or --output option:
-ef /path/to/your/file.txt -a ALGORITHM -p PASSWORD -o /path/to/output/file.txt
If you need a reminder on the available options:
-h
To list all available algorithms:
-l
To generate a random password:
-r
To generate a QR code from a public key:
-qr
Specify a password for encryption or decryption using -p or --password:
-p "YourPasswordHere"
Note: If you don't provide a required argument via command line, you'll be prompted to enter it interactively.
Contributions are always welcome! Please see the Contribution Guide for more information.
This software, "KTX GUARD", was created for learning purposes and is provided "as is", without any warranty. The author holds no responsibility for how this software is used or any consequences arising from its use.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above disclaimer and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.