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.
    ILicense verify​(java.lang.String licenseKey, ILicenseContext context)
    Verifies the given license string.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • verify

      public ILicense verify​(java.lang.String licenseKey, ILicenseContext context)
      Verifies the given license string.
      Specified by:
      verify in interface ILicenseVerifier
      Parameters:
      licenseKey - the license string
      context - the verification context
      Returns:
      the license verified
    • decrypt

      protected byte[] decrypt​(ILicenseContext context, byte[] bytes) throws java.security.GeneralSecurityException, java.io.IOException
      Decrypts the bytes.
      Parameters:
      context - the licensing context
      bytes - bytes to be decrypted
      Returns:
      the plain message
      Throws:
      java.io.IOException - when I/O problems occur with key
      java.security.GeneralSecurityException - when decryprion problems occur