Control iSignEnroll

This is the basic control used for enrolling signature templates that can be later used for authentication.

To embed the control into your html page either use a tool like Microsoft Visual Studio.Net 2003 or similar, or add the following code to your source file. Using a tool will also make it a lot easier to set initial properties like borderstyle, bordercolor, inkcolor, etc. since you can use the build-in property sheets.

<OBJECT style="Z-INDEX: 114; LEFT: 24px; WIDTH: 384px; POSITION: absolute; TOP: 144px; HEIGHT: 200px"
name="iSignEnroll1" id="iSignEnroll1" codeBase="../Cab/iSignEnrollNet.cab#version=4,0,0,5323"
classid="clsid:AEB48C7C-B56A-40E0-9DE0-DB414124F0FF" VIEWASTEXT>
<PARAM NAME="_cx" VALUE="10160">
<PARAM NAME="_cy" VALUE="5292">
<PARAM NAME="BackgroundColor" VALUE="16777215">
<PARAM NAME="InkColor" VALUE="0">
<PARAM NAME="BorderStyle" VALUE="3">
<PARAM NAME="BorderColor" VALUE="0">
<PARAM NAME="InkWidth" VALUE="2">
<PARAM NAME="WritingGuide" VALUE="2">
<PARAM NAME="EncryptionEnabled" VALUE="0">
<PARAM NAME="Enabled" VALUE="1">
<PARAM NAME="EncryptionAlgorithm" VALUE="1">
<PARAM NAME="EncryptionKey" VALUE="">
<PARAM NAME="EnrollOptions" VALUE="3">
</OBJECT>

 

Property Summary
int

BackgroundColor

Background color of the control window.

int

BorderStyle

Specifies CIC's nonPrinting encoding.

int

BorderColor

Used in setEnryptionAlg: DES 56 bit encryption algorithm

int

CtlEnabled

Enable or disable inking in control.

_EncrAlg

EncryptionAlgorithm

Sets the encryption algorithm.

int

EncryptionEnabled

Enables/disables the encryption of the ink.

string

EncryptionKey

Sets the encryption key

int

EnrollOptions

The number of signatures needed for setting up a template, either 3 or 6.

long

HashVal

Return the results of the hashing done using InitHash, AddHash and FinishHash.  Each hash value is a long integer. 

int

InkColor

Current color of ink input.

int

InkWidth

Current width of ink input.

long

Status

The status of the signature enrollment process.

string

Template

The template data. Access this property to save or restore the control's contents from disk or a database.

int

TimeOut

The timeout for the InkReady event in milliseconds.

int

WritingGuide

Option of letter guide, signature guide or no guide.

 

Method Summary
long

AddHash(string sHash)

Adds string to be hashed to the current hashing session.

void

ClearSignature( )

Clears the signature in the control.

void

ConfirmSignature( )

Confirm the current signature and make the template. Template result from this function could be obtained through Template property.

void

EnrollSignature( )

Enroll the current signature into the template.  The function only check the consistency of the template.

long

FinishHash()

Finalizes the hashing session and returns the result in HashVal1 through HashVal5.

long

HasInk( )

Returns whether or not control contains any ink .

void

InitHash()

Initiates a hashing session. Is used in conjunction with AddHash and FinishHash.

void

ResetTemplate( )

Resets the template to tsEmpty.

void

SetHashAlgorithm(int alg)

Set the hash mode.

 

Event Summary
  OnInkReady

Occurs 750 milliseconds after the last pen-down point. The timeout can be changed using the Timeout property.

 

OnStatusChanged(TemplateStatus status)

Called when the status of the template is changed.

 

OnStrokeReady

Occurs immediately when the pen is lifted at the end of a stroke.

 

 

Property Details

BackgroundColor

public static int BackgroundColor

Background color of the control window.


BorderStyle

public static int BorderStyle

Border style of the control window.

Options:

0
None
1
Single
2
Double
3
3D

VB.Net Usage: Object.BorderStyle = 3

C# Usage: Object.BorderStyle = (ISIGNCONTROLLib._BorderStyle) 3;


BorderColor

public static int BorderColor

Border color of the control window.


CtlEnabled

public static int CtlEnabled

Enables/disables inking in control.

Options:

0
Disabled
1
Enabled

VB.Net Usage: object.CtlEnabled = 1

C# Usage: object.CtlEnabled = 1;


EncryptionAlgorithm

public static ISIGNENROLLMENTCONTROLLib._EncrAlg EncryptionAlgorithm

Sets the encryption algorithm

Options:

-1
NONE
No encryption algorithm specified.
0
FAST CIC's FAST encryption algorithm
1
DES DES 56 bit encryption algorithm
2
DES_40 DES 40 bit encryption algorithm
3
TRIPLE_DES DES 128 bit encryption algorithm

VB.Net Usage: object.EncryptionAlgorithm = 3  ' Triple_DES used here

C# Usage: object.EncryptionAlgorithm = (ISIGNENROLLMENTCONTROLLib._EncrAlg)  3;  // Triple_DES used here


EncryptionEnabled

public static int EncryptionEnabled

Enables/disables the encryption of the ink.

Options:

0
Disabled
1
Enabled

VB.Net Usage: object.EncryptionEnabled = 1

C# Usage: object.EncryptionEnabled = 1;


EncryptionKey

public static string Encryptionkey

Sets the encryption key

VB.Net Usage: object.Encryptionkey = "12345678"

C# Usage: object.Encryptionkey = "12345678";


EnrollOptions

public static int EnrollOptions

The number of signatures needed for setting up a template, either 3 or 6.

VB.Net Usage: object.EnrollOptions = 3

C# Usage: object.EnrollOptions = 3;


HashVal

public static string HashVal

Return the result(s) of the hashing done using InitHash, AddHash and FinishHash.  Each hash value is a long integer. 

VB.Net Usage: Dim s As String = object.HashVal

C# Usage: object.HashVal;


InkColor

public static int InkColor

Sets/gets the current color of ink input.

VB.Net Usage: object.InkColor = Color.Blue

C# Usage: object.InkColor;


InkWidth

public static int InkWidth

Sets/gets the current width of ink input.

VB.Net Usage: object.InkWidth = 5

C# Usage: object.InkWidth;


Status

public static int Status

The status of the signature enrollment process.

Returns:

0
tsComplete
Template is complete
1
tsNeedSignature
Need more signatures
2
tsIncosistent
Signatures not consistent
3
tsEmpty
No signatures yet
4
tsTooSimple
Signatures are too simple

VB.Net Usage: if object.Status = 0 then

C# Usage: if (object.Status == 0)


Template

public static string Template

The template data. Access this property to save or restore the control's contents from disk or a database.

VB.Net Usage: object.Template

C# Usage: object.Template;


TimeOut

public static int TimeOut

The timeout for the InkReady event in milliseconds.

VB.Net Usage: object.TimeOut = 750

C# Usage: object.TimeOut = 750;


WritingGuide

public static int WritingGuide

Option of letter guide, signature guide or no guide.

VB.Net Usage: object.WritingGuide = 2

C# Usage: object.WritingGuide = 2;

 

Method Details

AddHash(string sHash)

public long AddHash(string sHash)

Adds string to be hashed to the current hashing session.

Returns:

0
Success
100 MaxLengthExceeded
101 Bad Mode

VB.Net Usage: Dim r As Long = object.AddHash(signature)

C# Usage: object.AddHash(signature );


ClearSignature()

public void ClearSignature()

Clears the signature in the control.

VB.Net Usage: object.ClearSignature

C# Usage: object.ClearSignature( );


ConfirmSignature()

public void ConfirmSignature()

Confirm the current signature and make the template. Template result from this function could be obtained through Template property.

VB.Net Usage: object.ConfirmSignature

C# Usage: object.ConfirmSignature( );


EnrollSignature()

public void EnrollSignature()

Enroll the current signature into the template.  The function only check the consistency of the template.

For 6 signature template, call ConfirmSignature afterwards to make the template.

VB.Net Usage: object.EnrollSignature

C# Usage: object.EnrollSignature( );


FinishHash()

public long FinishHash()

Finalizes the hashing session and returns the result in HashVal1 through HashVal5.

Returns: Always returns Success = 0

VB.Net Usage: object.FinishHash

C# Usage: object.FinishHash( );


HasInk( )

public long HasInk( )

Returns whether or not control contains any ink.

Returns:

0
no ink
1 ink exists

VB.Net Usage: Dim r As Long = object.HasInk

C# Usage: object.HasInk( );


InitHash()

public void InitHash()

Initiates a hashing session. Is used in conjunction with AddHash and FinishHash.

VB.Net Usage: object.InitHash

C# Usage: object.InitHash( );


ResetTemplate()

public void ResetTemplate()

Resets the template to tsEmpty.

VB.Net Usage: object.ResetTemplate

C# Usage: object.ResetTemplate( );


SetHashAlgorithm (int alg)

public void SetHashAlgorithm (int alg)

Set the hash mode.

Mode :

0
HASH_SHA0
SHAO Algorithm
1
HASH_SHA1
SHA1 Algorithm

Default is SHA0. Once set, all hash operation are done in this mode until control is unloaded.

VB.Net Usage: object.SetHashAlgorithm (1)

C# Usage: object.SetHashAlgorithm (1);

 

Event Details

OnInkReady

Occurs 750 milliseconds after the last pen-down point. The timeout can be changed using the Timeout property.

VB.Net Usage: object_OnInkReady(object sender, System.EventArgs e)

C# Usage: object_OnInkReady(object sender, System.EventArgs e);


OnStatusChanged(TemplateStatus status)

Called when the status of the template is changed.

VB.Net Usage: object_OnStatusChanged(object sender, System.EventArgs e)

C# Usage: object_OnInkReady(object sender, System.EventArgs e);


OnStrokeReady

Occurs immediately when the pen is lifted at the end of a stroke.

VB.Net Usage: object_OnStrokeReady(object sender, System.EventArgs e)

C# Usage: object_OnStrokeReady(object sender, System.EventArgs e);