Licify is a robust and modern Java library for software license management, providing advanced features including hybrid encryption (AES+RSA), digital signatures, hardware validation, and multiple serialization formats.
- ✅ Java 17+: Updated to the latest language features
- ✅ Complete CI/CD: GitHub Actions with multi-version builds (Java 17 and 21)
- ✅ Automatic Publishing: Configured for Maven Central
- ✅ Enhanced Documentation: Complete Javadocs and detailed examples
- ✅ New Features: Floating licenses, automatic update system
- ✅ Code Quality: Checkstyle, JaCoCo coverage >40%
- Combination of symmetric (AES-256) and asymmetric (RSA-2048/3072/4096) algorithms
- Flexible security parameter configuration
- Support for multiple key sizes
- Secure session key management
- Cryptographic integrity validation
- Configurable algorithms (SHA256withRSA, SHA384withRSA, SHA512withRSA)
- Automatic authenticity verification
- Public key fingerprint
- License binding to specific hardware
- Multi-component analysis (CPU, motherboard, disk, MAC)
- Hardware configuration backup
- Tolerance to minor hardware changes
- BINARY: Maximum efficiency and compactness
- STRING: Human readability (Base64)
- XML: Interoperability with external systems
- PROPERTIES: Integration with configuration files
- Blacklist of revoked licenses
- JSON file persistence
- Real-time verification
- Scheduled cleanup
- Deterministic cryptographic seeds
- Multiple hash algorithms (SHA-256/384/512)
- System entropy included
- Ideal for offline licenses
<dependency>
<groupId>com.licify</groupId>
<artifactId>licify</artifactId>
<version>2.0.0</version>
</dependency>implementation 'com.licify:licify:2.0.0'- Java: 17 or higher
- Maven: 3.8+ (for building)
import com.licify.LicenseKeyPair;
import java.security.KeyPair;
// Generate RSA key pair
KeyPair keyPair = LicenseKeyPair.generateKeyPair(2048);
// Save keys
LicenseKeyPair.saveKeyPair(keyPair, "keys/");import com.licify.Licify;
import com.licify.Licify.License;
import java.time.LocalDateTime;
Licify licify = new Licify();
License license = new Licify.LicenseBuilder()
.licenseeName("John Doe")
.licenseeEmail("john@example.com")
.productId("MYPRODUCT-001")
.productVersion("1.0.0")
.expirationDate(LocalDateTime.now().plusYears(1))
.maxUsers(10)
.feature("premium-support")
.feature("cloud-sync")
.licenseType("COMMERCIAL")
.hardwareId() // Uses current hardware
.build();import java.security.KeyPair;
// Load private key
KeyPair keyPair = LicenseKeyPair.loadKeyPair("keys/");
// Sign license
licify.sign(license, keyPair);
System.out.println("Signed license: " + license.getSignature());import com.licify.io.IOFormat;
// Save in binary format
licify.save(license, "license.bin", IOFormat.BINARY);
// Or save in XML format
licify.save(license, "license.xml", IOFormat.XML);import com.licify.Licify.ValidationResult;
// Load license
License loadedLicense = licify.load("license.bin", IOFormat.BINARY);
// Validate signature
ValidationResult result = licify.validateSignature(loadedLicense, keyPair.getPublic());
if (result.isValid()) {
System.out.println("✅ Valid license");
} else {
System.err.println("❌ Invalid license: " + result.getErrors());
}
// Check expiration
if (loadedLicense.isExpired()) {
System.err.println("⚠️ Expired license");
}
// Verify hardware
boolean hardwareMatch = licify.validateHardwareId(loadedLicense);
if (!hardwareMatch) {
System.err.println("⚠️ Hardware mismatch");
}import com.licify.encryption.EncryptionConfig;
EncryptionConfig config = new EncryptionConfig.Builder()
.setKeySize(4096) // RSA 4096 bits
.setAesKeySize(256) // AES 256 bits
.setTransformation("RSA/ECB/OAEPWithSHA-256AndMGF1Padding")
.build();
licify.setDefaultEncryptionConfig(config);import com.licify.signing.SignatureConfig;
SignatureConfig sigConfig = new SignatureConfig.Builder()
.algorithm("SHA512withRSA")
.provider("SunRsaSign")
.hashAlgorithm("SHA-512")
.build();
licify.setDefaultSignatureConfig(sigConfig);// Create floating license for network
License floatingLicense = new Licify.LicenseBuilder()
.licenseeName("Company Inc.")
.productId("NETWORK-LICENSE")
.maxUsers(50) // 50 concurrent users
.licenseType("FLOATING")
.customData("{\"server\":\"license-server.example.com\",\"port\":27000}")
.build();# Compile project
mvn clean compile
# Run tests
mvn test
# Generate coverage report
mvn jacoco:report
# Verify code quality
mvn verify
# Full build
mvn clean installReports are generated in:
target/surefire-reports/- Test resultstarget/site/jacoco/- HTML code coveragetarget/jacoco.exec- Execution data
Licify/
├── src/main/java/com/licify/
│ ├── Licify.java # Main API
│ ├── LicenseKeyPair.java # Key management
│ ├── SeedGenerator.java # Seed generation
│ ├── Main.java # Entry point
│ ├── core/ # Core functionality
│ │ ├── LicenseSerializer.java
│ │ ├── LicenseRevocationManager.java
│ │ └── ShortLicenseKey.java
│ ├── encryption/ # Hybrid encryption
│ │ ├── HybridEncryption.java
│ │ ├── EncryptionConfig.java
│ │ └── HybridEncryptionResult.java
│ ├── signing/ # Digital signatures
│ │ ├── DigitalSignature.java
│ │ └── SignatureConfig.java
│ ├── hardware/ # Hardware identification
│ │ ├── HardwareId.java
│ │ └── HardwareIdBackup.java
│ ├── io/ # I/O formats
│ │ └── IOFormat.java
│ ├── util/ # Utilities
│ │ ├── KeyUtils.java
│ │ └── DateTimeUtils.java
│ └── exception/ # Exceptions
│ └── ValidationException.java
├── src/test/java/com/licify/
│ └── LicifyTest.java # Test suite
├── .github/workflows/
│ └── maven.yml # CI/CD pipeline
├── pom.xml # Maven configuration
└── README.md # This documentation
The project includes a complete GitHub Actions pipeline that:
- Multi-Version Build: Compiles with Java 17 and 21
- Automated Tests: Runs 27 unit tests
- Coverage: Generates JaCoCo reports
- Quality: Executes Checkstyle and Javadoc validation
- Publishing: Deploys to Maven Central on releases
To enable automatic publishing, configure these secrets in GitHub:
OSSRH_USERNAME: Sonatype OSSRH usernameOSSRH_TOKEN: Sonatype OSSRH tokenGPG_PRIVATE_KEY: GPG private key (armored)GPG_PASSPHRASE: GPG key passphrase
| Metric | Value | Threshold |
|---|---|---|
| Tests Passing | 27/27 (100%) | ✅ |
| Line Coverage | >40% | ✅ |
| Complexity Coverage | >30% | ✅ |
| Compilation | SUCCESS | ✅ |
| Java Version | 17+ | ✅ |
Contributions are welcome. Please:
- Fork the repository
- Create a branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
This project is under the MIT license - see the LICENSE file for details.
Yasmin Ramos - yasmramos
Built with ☕ Java and ❤️