licverify 0.1.1

Rust client for go-license verification system
Documentation
//! # licverify
//!
//! Enterprise-grade license verification for Rust applications.
//!
//! `licverify` is a Rust client for the [go-license](https://github.com/luhtfiimanal/go-license)
//! verification system, providing secure license validation with RSA-SHA256 signatures,
//! hardware binding, and automatic expiry enforcement.
//!
//! This library is fully compatible with licenses generated by the go-license ecosystem,
//! including the main [go-license](https://github.com/luhtfiimanal/go-license) generator
//! and [python-licverify](https://github.com/luhtfiimanal/python-licverify) client.
//!
//! ## Features
//!
//! - **🔐 RSA-SHA256 Verification**: Cryptographic signature validation using 2048-bit RSA
//! - **💻 Hardware Binding**: Device-locked licensing with MAC addresses, disk IDs, and hostnames  
//! - **⏰ Expiry Validation**: Automatic license expiration checking
//! - **🔄 Format Support**: Compatible with both binary (v2.0+) and JSON (v1.x) license formats
//! - **🚀 Cross-Platform**: Supports Linux, Windows, and macOS
//! - **📚 Easy Integration**: Simple API for embedding in applications
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use licverify::Verifier;
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Load your RSA public key
//! let public_key_pem = std::fs::read_to_string("public.pem")?;
//! let verifier = Verifier::new(&public_key_pem)?;
//!
//! // Load and verify license
//! let license = verifier.load_license("license.lic")?;
//! verifier.verify(&license)?;
//!
//! println!("✅ License is valid!");
//! println!("Customer: {}", license.customer_id);
//! println!("Expires: {}", license.expiry_date);
//! # Ok(())
//! # }
//! ```
//!
//! ## Hardware Binding
//!
//! Prevent license sharing by binding to specific hardware:
//!
//! ```rust,no_run
//! use licverify::{Verifier, HardwareInfo};
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! # let public_key_pem = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----";
//! # let verifier = Verifier::new(public_key_pem)?;
//! # let license = verifier.load_license("license.lic")?;
//! // Verify hardware binding
//! verifier.verify_hardware_binding(&license)?;
//!
//! // Get current hardware info
//! let hw_info = HardwareInfo::get()?;
//! println!("MAC Addresses: {:?}", hw_info.mac_addresses);
//! # Ok(())
//! # }
//! ```
//!
//! ## License Formats
//!
//! - **Binary Format**: Full support for go-license v2.0+ binary format
//! - **JSON Format**: Legacy compatibility with go-license v1.x JSON format
//! - **Signature**: RSA-2048 PKCS#1 v1.5 with SHA-256 hashing

pub mod error;
pub mod hardware;
pub mod license;
pub mod verifier;

pub use error::{LicenseError, LicenseResult};
pub use hardware::{HardwareBinding, HardwareInfo};
pub use license::License;
pub use verifier::Verifier;