public class LicenseManager
extends java.lang.Object
| Constructor and Description |
|---|
LicenseManager() |
| Modifier and Type | Method and Description |
|---|---|
static LicenseKeyPair |
createKeyPair(java.lang.String name,
java.lang.String description,
java.lang.String keypairAlgorithm,
java.lang.String signatureAlgorithm,
int keysize)
Creates and returns new LicenseKeyPair object which includes public and
private keys.
|
static java.lang.String |
generateLicenseKey(LicenseKeyPair keypair,
LicenseKey licenseKeyObject)
Generates cryptographically secure license key from given license key
object and key pair.
|
static java.lang.String |
generateLicenseKey(java.lang.String publickey,
LicenseKey licenseKeyObject)
Generates basic license key from given license key object and public key.
|
static java.lang.String |
generateLicenseText(LicenseKeyPair keypair,
LicenseText licenseTextObject)
Generates license text from given license text object and key pair.
|
static java.lang.String |
getLibraryVersion()
License4J library version info.
|
static LicenseKeyPair |
loadKeyPair(java.lang.String keypairString)
Loads key pair.
|
public static LicenseKeyPair createKeyPair(java.lang.String name, java.lang.String description, java.lang.String keypairAlgorithm, java.lang.String signatureAlgorithm, int keysize) throws LicenseSecurityException
name - key pair descriptive namedescription - descriptionkeypairAlgorithm - one of the key pair algorithms below LicenseKeyPair.KEYPAIR_ALGORITHM_DSALicenseKeyPair.KEYPAIR_ALGORITHM_RSAsignatureAlgorithm - one of the signature algorithms below LicenseKeyPair.SIGNATURE_ALGORITHM_SHA1withDSALicenseKeyPair.SIGNATURE_ALGORITHM_MD5withRSALicenseKeyPair.SIGNATURE_ALGORITHM_SHA256withRSALicenseKeyPair.SIGNATURE_ALGORITHM_SHA512withRSAkeysize - one of the defined key sizes below LicenseKeyPair.KEYSIZE_512LicenseKeyPair.KEYSIZE_768LicenseKeyPair.KEYSIZE_1024LicenseKeyPair.KEYSIZE_2048LicenseSecurityExceptionpublic static LicenseKeyPair loadKeyPair(java.lang.String keypairString) throws LicenseSecurityException
keypairString - key pair as stringLicenseSecurityExceptionpublic static java.lang.String generateLicenseText(LicenseKeyPair keypair, LicenseText licenseTextObject) throws LicenseSecurityException
keypair - licenseTextObject - LicenseSecurityExceptionpublic static java.lang.String generateLicenseKey(LicenseKeyPair keypair, LicenseKey licenseKeyObject) throws LicenseSecurityException
keypair - licenseKeyObject - LicenseSecurityExceptionpublic static java.lang.String generateLicenseKey(java.lang.String publickey,
LicenseKey licenseKeyObject)
publickey - licenseKeyObject - public static java.lang.String getLibraryVersion()