| java.lang.Object jwebtk.licensing.LicenseCheck
LicenseCheck | final public class LicenseCheck (Code) | | This class is used to decrypt and verify license keys generated by LicenseGenerator.
By default, LicenseCheck will simply decrypt the license key and return an instance
of LicenseResult. LicenseResult should be verified by the application for validity.
When using LicenseCheck, you can concat ":match1" and/or ":match2"
to the license key. If match1 or match2 are included then they must match what
is parsed from the license key.
This is not a fool proof license, only a deterence.
|
Inner Class :final public static class LicenseResult | |
Method Summary | |
final public static LicenseResult | checkLicense(String license, String match1) Decrypts and parses a license generated by LicenseGenerator. | final public static LicenseResult | checkLicense(String license, String match1, String match2) Decrypts and parses a license generated by LicenseGenerator. | final public static LicenseResult | checkLicense(String license) Decrypts and parses a license generated by LicenseGenerator. | final static byte[] | encryptDecrypt(byte[] in, String password, boolean encrypt) | final public static boolean | isLicenseOk() If checkLicense() has returned a valid parsed license, then isLicenseOk() will return true. | public static void | main(String[] args) | final public static void | setEncryptDecryptReplacement(byte[] values, byte[] replacements) By default, part of the encryption uses a simple replacement algorithm. |
checkLicense | final public static LicenseResult checkLicense(String license, String match1) throws LicenseException(Code) | | Decrypts and parses a license generated by LicenseGenerator. If successful, checkLicense()
will return a Result object containing the license parts.
Parameters: license - a license generated by LicenseGenerator Parameters: match1 - match string provided to LicenseGenerator a LicenseResult that contains the license parts |
checkLicense | final public static LicenseResult checkLicense(String license, String match1, String match2) throws LicenseException(Code) | | Decrypts and parses a license generated by LicenseGenerator. If successful, checkLicense()
will return a Result object containing the license parts.
Parameters: license - a license generated by LicenseGenerator Parameters: match1 - match string provided to LicenseGenerator Parameters: match2 - match string provided to LicenseGenerator a LicenseResult that contains the license parts |
checkLicense | final public static LicenseResult checkLicense(String license) throws LicenseException(Code) | | Decrypts and parses a license generated by LicenseGenerator. If successful, checkLicense()
will return a Result object containing the license parts.
Parameters: license - a license generated by LicenseGenerator a LicenseResult that contains the license parts |
isLicenseOk | final public static boolean isLicenseOk()(Code) | | If checkLicense() has returned a valid parsed license, then isLicenseOk() will return true.
true if the license is valid |
setEncryptDecryptReplacement | final public static void setEncryptDecryptReplacement(byte[] values, byte[] replacements)(Code) | | By default, part of the encryption uses a simple replacement algorithm. The arrays
must be of equal lengths. The replacements array must contain the same values as
the values array, but should be mixed up.
Parameters: values - byte array of values Parameters: replacements - byte array of replacement values |
|
|