public class BaseLicenseHandler extends Object implements LicenseCodec, LicenseActivator
Constructor and Description |
---|
BaseLicenseHandler(String encryptionKey)
Create a new manager that will generate license keys with the encrypted
using the supplied encryption key and the default check-sum.
|
BaseLicenseHandler(String encryptionKey,
byte cksum)
Create a new manager that will generate license keys with the specified
check-sum and encrypted using the supplied encryption key.
|
Modifier and Type | Method and Description |
---|---|
License |
activate(License license)
Activates the specified license.
|
License |
deactivate(License license)
De-activates the specified license.
|
License |
decode(String licKey)
Decodes the specified license key into a license object.
|
String |
encode(License license)
Encodes the specified license data into an external license key.
|
License |
expire(License license)
Sets to expire a specified license.
|
public BaseLicenseHandler(String encryptionKey, byte cksum)
encryptionKey
- key for encrypting the license datacksum
- consumed and generated license keys must have this
check-sumpublic BaseLicenseHandler(String encryptionKey)
encryptionKey
- key for encrypting the license datapublic License activate(License license)
LicenseActivator
LicenseStatus.NEW
.activate
in interface LicenseActivator
license
- new license issued by the licensing authoritypublic License deactivate(License license)
LicenseActivator
LicenseStatus.NEW
or LicenseStatus.ACTIVE
.deactivate
in interface LicenseActivator
license
- license issued by the licensing authoritypublic License expire(License license)
LicenseActivator
LicenseStatus.NEW
or LicenseStatus.ACTIVE
.expire
in interface LicenseActivator
license
- license issued by the licensing authoritypublic License decode(String licKey)
LicenseCodec
decode
in interface LicenseCodec
licKey
- license keypublic String encode(License license)
LicenseCodec
encode
in interface LicenseCodec
license
- license dataCopyright © 2016. All Rights Reserved.