|
CIC iSign Version 1.2 | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
java.lang.Object | +--InkTools.CicSigCheck
CIC's signature verification class. Signature verification means to compare a signature to a previously generated user template and to make a decision based on the 'verification score' if the signature is reasonable matching the template so that it can be assumed that the signature and the template are from the same person. The latter case means that the signature is verified. If signature and template are not matching, forgery is assumed.
The process to generate a user template is called 'enrollment'. The user has to create 3 (up to 6) signatures, which gets passed into the 'signatureEnrollment' method, which then creates the user template. Encryption can be used to keep this template always in an encrypted form in memory. The 'streamOut' and 'loadTemplate' functions can be used for serialization (saving and restoring of the template). It is recommendet to always use encryption for the template, so that the template can't get manipulated or replaced bu a possible indruder.
For the verification, a user template has to get loaded into the CicSigCheck class. If the template was stored as an encrypted byte stream, the correct encryption key has to get set before the loading or in the loading function, otherwise the 'loadTemplate' method will fail and verification can't be done. Use the 'hasTemplate' function to test if a valid template is loaded. The 'setThreshold' function will let you set your desired threshold for the verification process, which means how closely the signature must match the template to get verified. Note that the 'verifySignature' returns 3 verification results: verified, ambigious and forgery.
The verification process has an automated 'user template update' functinality, that means that if the signature was verified, the template may be updated in order compensate for the slow changing of a users signature over time. In this case the updated template must be saved to replace the older template. Call the 'templateIsUpdated' function to check the status.
| Field Summary | |
static int |
BASE64
specifies stabdarde Base64 encoding |
static int |
CIC_CONSISTENT
ConsistencyCheck: all signatures are consistent (0) |
static int |
CIC_INCONSISTENT
ConsistencyCheck: signature is inconsistent (1) |
static int |
CIC_NO_SIGNATURE
ConsistencyCheck: no signature provided for this array element (-1) |
static int |
CIC_NOT_VALID
ConsistencyCheck: signature is not recognized as a signaure (3) |
static int |
CIC_TOO_SIMPLE
ConsistencyCheck: signature is too simple (2) |
static int |
CICNONEPRINT
specifies CIC's nonPrinting encoding |
static int |
DES
used in setEnryptionAlgorithm: DES 56 bit encryption algorithm |
static int |
DES40
used in setEnryptionAlgorithm: DES 40 bit encryption algorithm |
static int |
FAST
used in setEnryptionAlgorithm: CIC's FAST encryption algorithm |
static int |
TRIPLEDES
used in setEnryptionAlgorithm: DES 128 bit encryption algorithm |
| Constructor Summary | |
CicSigCheck()
Creates a new signature verification object. |
|
| Method Summary | |
CicReturn |
ConsistencyCheck(CicDoodle[] pDoodle,
int numDoodles,
int[] consistent)
With the ConsistencyCheck function you can check if the signatures, with which you want to enroll, are consistence, meaning an enrollment would succeed. |
CicReturn |
ConsistencyCheckEx(CicDoodle[] pDoodle,
int numDoodles,
int[][] consArray,
int[] order,
int[] val)
|
void |
disableEncryption()
Disables encryption for templates. |
void |
enableEncryption()
Enables encryption for templates. |
CicReturn |
extractSignature(CicDoodle doodle,
int index)
Extracts from the current active template the signature with the requested index. |
SigCheck.SigTemplate |
getTemp()
Return the current template, or null if there is none. |
int |
getUpdatePosition()
On every call to the 'signatureVerification' function the verification algorithm will save the place where the template was updated, if any. |
int |
hasTemplate()
Checks if a valid template is currently loaded. |
CicReturn |
loadEncryptTemplate(byte[] inStream)
Loads an encrypted template from the byte array and makes it the active template. |
CicReturn |
loadEncryptTemplate(byte[] inStream,
java.lang.String key)
Loads an encrypted template from the byte array and makes it the active template. |
CicReturn |
loadEncryptTemplate(java.lang.String fileName)
Loads an encrypted template from file and makes it the active template. |
CicReturn |
loadEncryptTemplate(java.lang.String fileName,
java.lang.String key)
Loads an encrypted template from file and makes it the active template. |
CicReturn |
loadTemplate(byte[] inStream)
Loads a template from the byte array and makes it the active template. |
CicReturn |
loadTemplate(java.lang.String fileName)
Loads a template from file and makes it the active template. |
int |
matchScore()
On every call to the 'signatureVerification' function the verification algorithm will save the match score for the attempt. |
CicReturn |
setEncryptionAlgorithm(int alg)
Set the encryption algorithm used for encrypting the template. |
void |
setEncryptionKey(java.lang.String encKey)
Set the encryption key. |
boolean |
setStringEncodingAlg(int encoderAlgorithm)
Sets the encoding algorithm if the streamOut function is called with removeNonPrinting set to true. |
CicReturn |
setThreshold(int threshold)
Sets the threshold level for the verification process. |
void |
setUpdateEnabled(boolean val)
Set the update enabled flag to the specified value. |
CicReturn |
signatureEnrollment(CicDoodle[] pDoodle,
int numDoodles,
boolean newEnroll)
Signature enrollment function. |
CicReturn |
signatureVerification(CicDoodle doodle)
Verifies the passed in signature against the currently loaded user template. |
byte[] |
streamOutTemplate(boolean bRemoveNonePrinting)
Streams the currently active template out into a byte stream for serialization purposes. |
CicReturn |
streamOutTemplate(java.lang.String fileName,
boolean bRemoveNonePrinting)
Streams the currently active template out as a byte stream into a file. |
boolean |
templatedIsUpdated()
On every call to the 'signatureVerification' function the verification algorithm will dynamically evaluate if the user template has to get updated. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DES40
public static final int DES
public static final int TRIPLEDES
public static final int FAST
public static final int CICNONEPRINT
public static final int BASE64
public static final int CIC_CONSISTENT
public static final int CIC_INCONSISTENT
public static final int CIC_TOO_SIMPLE
public static final int CIC_NOT_VALID
public static final int CIC_NO_SIGNATURE
| Constructor Detail |
public CicSigCheck()
| Method Detail |
public CicReturn signatureEnrollment(CicDoodle[] pDoodle,
int numDoodles,
boolean newEnroll)
pDoodle - array object of 3 to 6 doodle objectsnumDoodles - number of doodles passed innewEnroll - true if this is a new enrollment, false if signatures are added
in the case of an priviously error (for example, the signatures
where not consistend and a signature has to get replaced
public CicReturn ConsistencyCheck(CicDoodle[] pDoodle,
int numDoodles,
int[] consistent)
pDoodle - array object of 3 to 6 doodle objectsnumDoodles - number of doodles passed inconsistent - array object of 6 ints, returning the status
of the single signature:
public CicReturn ConsistencyCheckEx(CicDoodle[] pDoodle,
int numDoodles,
int[][] consArray,
int[] order,
int[] val)
public CicReturn signatureVerification(CicDoodle doodle)
doodle - signature in form of a doodle
public CicReturn setThreshold(int threshold)
threshold - the threshold level
public int matchScore()
public boolean templatedIsUpdated()
public int getUpdatePosition()
public int hasTemplate()
public SigCheck.SigTemplate getTemp()
public void setUpdateEnabled(boolean val)
public CicReturn extractSignature(CicDoodle doodle,
int index)
doodle - contains the new CicDoodle object with the signatureindex - the index of the signature requested.
public byte[] streamOutTemplate(boolean bRemoveNonePrinting)
bRemoveNonePrinting - true if all none printable bytes should be
replaced with printable ASCII characters (increases template size),
otherwise false
public CicReturn streamOutTemplate(java.lang.String fileName,
boolean bRemoveNonePrinting)
fileName - the file name of the templatebRemoveNonePrinting - true if all none printable bytes should be
replaced with printable ASCII characters (increases template size),
otherwise false
public CicReturn loadTemplate(byte[] inStream)
inStream - the template byte array
public CicReturn loadTemplate(java.lang.String fileName)
fileName - the file containing the template
public CicReturn loadEncryptTemplate(byte[] inStream)
inStream - the template byte array
public CicReturn loadEncryptTemplate(byte[] inStream,
java.lang.String key)
inStream - the template byte arraykey - the 8 or 24 byte encryption key
public CicReturn loadEncryptTemplate(java.lang.String fileName)
fileName - the name of the template file
public CicReturn loadEncryptTemplate(java.lang.String fileName,
java.lang.String key)
fileName - the template file namekey - the 8 or 24 byte encryption key
public void enableEncryption()
public void disableEncryption()
public void setEncryptionKey(java.lang.String encKey)
encKey - the encryption keypublic CicReturn setEncryptionAlgorithm(int alg)
alg - The used encryption algorithm
public boolean setStringEncodingAlg(int encoderAlgorithm)
encoderAlgorithm - either CIC_PRINTABLE or BASE64
|
CIC iSign Version 1.2 | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||