Package rs.baselib.licensing.internal
Class RsaLicenseVerifier
java.lang.Object
rs.baselib.licensing.internal.RsaLicenseVerifier
- All Implemented Interfaces:
ILicenseVerifier
public class RsaLicenseVerifier extends java.lang.Object implements ILicenseVerifier
Verifies a full license.
- Author:
- ralph
-
Constructor Summary
Constructors Constructor Description RsaLicenseVerifier()Constructor. -
Method Summary
Modifier and Type Method Description protected byte[]decrypt(ILicenseContext context, byte[] bytes)Decrypts the bytes.ILicenseverify(java.lang.String licenseKey, ILicenseContext context)Verifies the given license string.
-
Constructor Details
-
RsaLicenseVerifier
public RsaLicenseVerifier()Constructor.
-
-
Method Details
-
verify
Verifies the given license string.- Specified by:
verifyin interfaceILicenseVerifier- Parameters:
licenseKey- the license stringcontext- the verification context- Returns:
- the license verified
-
decrypt
protected byte[] decrypt(ILicenseContext context, byte[] bytes) throws java.security.GeneralSecurityException, java.io.IOExceptionDecrypts the bytes.- Parameters:
context- the licensing contextbytes- bytes to be decrypted- Returns:
- the plain message
- Throws:
java.io.IOException- when I/O problems occur with keyjava.security.GeneralSecurityException- when decryprion problems occur
-