Class OctetLicenseVerifier

java.lang.Object
rs.baselib.licensing.internal.OctetLicenseVerifier
All Implemented Interfaces:
ILicenseVerifier

public class OctetLicenseVerifier
extends java.lang.Object
implements ILicenseVerifier
Verifies an Octet License.
Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    OctetLicenseVerifier()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    protected static java.lang.String ungroup​(java.lang.String s)
    Returns the un-grouped version of the key.
    protected boolean verify​(byte[] signature, SimpleLicense license, ILicenseContext context)
    Verifies the signature
    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
    • verify

      protected boolean verify​(byte[] signature, SimpleLicense license, ILicenseContext context) throws DecryptionException, SigningException, java.io.UnsupportedEncodingException
      Verifies the signature
      Parameters:
      signature - signature to be verified
      license - the license to be checked against
      context - the context
      Returns:
      true when signature is ok
      Throws:
      DecryptionException - - when decryption fails
      SigningException - - when signing verification fails
      java.io.UnsupportedEncodingException - - when the encoding is not supported
    • ungroup

      protected static java.lang.String ungroup​(java.lang.String s)
      Returns the un-grouped version of the key.
      Parameters:
      s - the key
      Returns:
      the un-grouped version (dashes removed)