Package rs.baselib.licensing
Class LicGen
java.lang.Object
rs.baselib.licensing.LicGen
- All Implemented Interfaces:
java.lang.Runnable
public class LicGen
extends java.lang.Object
implements java.lang.Runnable
A universal generator for creating RSA licenses.
- Author:
- ralph
-
Constructor Summary
Constructors Constructor Description LicGen(java.lang.String product, long expirationTime, java.lang.String owner)Constructor. -
Method Summary
Modifier and Type Method Description longgetExpirationTime()Returns theexpirationTime.java.lang.StringgetLicenseKey()Returns thelicenseKey.static LicGengetLicgen()Returns thelicgen.static OptionsgetOptions()Creates the CLI options.java.lang.StringgetOwner()Returns theowner.java.lang.StringgetProduct()Returns theproduct.static voidmain(java.lang.String[] args)CLI.protected static longparseTime(java.lang.String s)protected static voidprintHelp(Options options)Prints the CLI help.voidrun()
-
Constructor Details
-
LicGen
public LicGen(java.lang.String product, long expirationTime, java.lang.String owner)Constructor.- Parameters:
product- - the name of the productexpirationTime- - the time of license expirationowner- - the owner of the license
-
-
Method Details
-
getLicenseKey
public java.lang.String getLicenseKey()Returns thelicenseKey.- Returns:
- the licenseKey
-
run
public void run()- Specified by:
runin interfacejava.lang.Runnable
-
main
public static void main(java.lang.String[] args)CLI.- Parameters:
args- - command line arguments
-
printHelp
Prints the CLI help.- Parameters:
options- CLI options.
-
getOptions
Creates the CLI options.- Returns:
- CLI options
-
parseTime
protected static long parseTime(java.lang.String s) -
getLicgen
Returns thelicgen.- Returns:
- the licgen
-
getProduct
public java.lang.String getProduct()Returns theproduct.- Returns:
- the product
-
getExpirationTime
public long getExpirationTime()Returns theexpirationTime.- Returns:
- the expirationTime
-
getOwner
public java.lang.String getOwner()Returns theowner.- Returns:
- the owner
-