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_DSA
LicenseKeyPair.KEYPAIR_ALGORITHM_RSA
signatureAlgorithm
- one of the signature algorithms below LicenseKeyPair.SIGNATURE_ALGORITHM_SHA1withDSA
LicenseKeyPair.SIGNATURE_ALGORITHM_MD5withRSA
LicenseKeyPair.SIGNATURE_ALGORITHM_SHA256withRSA
LicenseKeyPair.SIGNATURE_ALGORITHM_SHA512withRSA
keysize
- one of the defined key sizes below LicenseKeyPair.KEYSIZE_512
LicenseKeyPair.KEYSIZE_768
LicenseKeyPair.KEYSIZE_1024
LicenseKeyPair.KEYSIZE_2048
LicenseSecurityException
public static LicenseKeyPair loadKeyPair(java.lang.String keypairString) throws LicenseSecurityException
keypairString
- key pair as stringLicenseSecurityException
public static java.lang.String generateLicenseText(LicenseKeyPair keypair, LicenseText licenseTextObject) throws LicenseSecurityException
keypair
- licenseTextObject
- LicenseSecurityException
public static java.lang.String generateLicenseKey(LicenseKeyPair keypair, LicenseKey licenseKeyObject) throws LicenseSecurityException
keypair
- licenseKeyObject
- LicenseSecurityException
public static java.lang.String generateLicenseKey(java.lang.String publickey, LicenseKey licenseKeyObject)
publickey
- licenseKeyObject
- public static java.lang.String getLibraryVersion()