Easygen is a lightweight, easy-to-integrate library that allows you to generate and validate software licenses in Python using digital signatures. Protect your applications from unauthorized use by linking licenses to the user's machine via HWID, all without relying on external servers.
- Digital signature with private key (RSA)
- Local validation without internet
- Licenses linked to the HWID machine
- Expiration date validation
License validation
from easygen.license_validator import validate_license
if validate_license("license.lic", "public_key.pem"):
print("Valid license")License generation
from easygen.license_generator import generate_license
generate_license(
user="pc-i5-2024",
hwid="EXAMPLE_12345_6789",
expiry_date_str="2025-12-31",
private_key_path="private_key.pem",
output_path="license.lic"
)Before using, you need to generate the private and public keys
# Private key (DO NOT SHARE)
openssl genrsa -out private_key.pem 2048
# Public key (This one must be included with the software)
openssl rsa -in private_key.pem -pubout -out public_key.pemInstallation from source
git clone https://github.com/freshSauce/easygen.git
cd easygen
pip install .or
git clone https://github.com/freshSauce/easygen.git
cd easygen
pip install --upgrade build
python -m buildTo run tests, run the following command
pytest .\tests\Distributed under the GNU GPLv3 License. See LICENSE for more information.
Want to contribute to the project? Great! Please follow the next steps in order to submit any feature or bug-fix :) You can also send me your ideas to my Telegram, any submit is greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request