public abstract class Verifier
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Verifier.License |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
LICENSE_FILE_NAME |
protected int |
status |
Modifier and Type | Method and Description |
---|---|
protected java.io.InputStream |
connectToURI(java.lang.String uri) |
protected static byte[] |
convertHexToBinary(java.lang.String hex)
Convert a Hex String into the corresponding byte array by encoding
each two hexadecimal digits as a byte.
|
java.lang.String |
getFeature(java.lang.String name,
Configuration config) |
protected Verifier.License |
getPrimaryLicense() |
protected abstract void |
loadLicense(Configuration config)
Locate the license file, read it, and verify it
|
protected Verifier.License |
readLicenseFile(java.io.InputStream is) |
protected void |
setPrimaryLicense(Verifier.License license) |
protected abstract boolean |
verify(java.lang.String data,
java.lang.String signature)
This method validates license data based on the signature and the public key.
|
protected int status
protected static final java.lang.String LICENSE_FILE_NAME
protected void setPrimaryLicense(Verifier.License license)
protected Verifier.License getPrimaryLicense()
public java.lang.String getFeature(java.lang.String name, Configuration config)
protected abstract void loadLicense(Configuration config)
config
- the Saxon configurationLicenseException
- if, for example, a license is found and is invalidprotected java.io.InputStream connectToURI(java.lang.String uri) throws java.io.IOException
java.io.IOException
protected Verifier.License readLicenseFile(java.io.InputStream is)
protected static byte[] convertHexToBinary(java.lang.String hex)
hex
- Hexadecimal digits representationprotected abstract boolean verify(java.lang.String data, java.lang.String signature) throws LicenseException
data
- the license data.signature
- the digital signatureLicenseException
- if a failure occurs in the verification processCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.