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 Interdev, Frontpage, 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 id=iSignEnroll1 style="LEFT: 0px; WIDTH: 503px; TOP: 0px; HEIGHT: 192px"
name=isignenroll1 codeBase=Cab/iSignEnroll.cab#version=3,2,0,5323
classid=clsid:AEB48C7C-B56A-40E0-9DE0-DB414124F0FF
data=data:application/x-oleobject;base64,fIy0rmq14ECd4NtBQSTw/wADAAD8MwAA2BMAABMA////ABMA/wAAAAMAAgAAABMAAAD/AAMAAgAAAAMAAgAAAAMAAAAAAAMAAgAAAAgAAgAAAAAA width=503 height=192 VIEWASTEXT>
<PARAM NAME="_cx" VALUE="10504">
<PARAM NAME="_cy" VALUE="5556">
<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 |
Background color of the control window. |
| int |
Specifies CIC's nonPrinting encoding. |
| int |
Used in setEnryptionAlg: DES 56 bit encryption algorithm |
| int |
Enable or disable inking in control. |
| EncrAlg |
Sets the encryption algorithm. |
| int |
Enables/disables the encryption of the ink. |
| string |
Sets the encryption key |
| int |
The number of signatures needed for setting up a template, either 3 or 6. |
| long |
Return the results of the hashing done using InitHash, AddHash and FinishHash. Each hash value is a long integer. |
| int |
Current color of ink input. |
| int |
Current width of ink input. |
| long |
The status of the signature enrollment process. |
| string |
The template data. Access this property to save or restore the control's contents from disk or a database. |
| int |
The timeout for the InkReady event in milliseconds. |
| int |
Option of letter guide, signature guide or no guide. |
| Method Summary | |
| long |
Adds string to be hashed to the current hashing session. |
| void |
Clears the signature in the control. |
| void |
Confirm the current signature and make the template. Template result from this function could be obtained through Template property. |
| void |
Enroll the current signature into the template. The function only check the consistency of the template. |
| long |
Finalizes the hashing session and returns the result in HashVal1 through HashVal5. |
| long |
Returns whether or not control contains any ink . |
| void |
Initiates a hashing session. Is used in conjunction with AddHash and FinishHash. |
| void |
Resets the template to tsEmpty. |
| void |
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. |
|
|
Occurs immediately when the pen is lifted at the end of a stroke. |
|
| Property Details |
public static int BackgroundColor
Background color of the control window.
VBScript Usage: object.BackgroundColor = 255
public static int BorderStyle
Border style of the control window.
Options:
0 |
None |
1 |
Single |
2 |
Double |
3 |
3D |
VBScript Usage: object.BorderStyle = 3
public static int BorderColor
Border color of the control window.
VBScript Usage: object.BorderColor = 255
public static int Enabled
Enables/disables inking in control.
Options:
0 |
Disabled |
1 |
Enabled |
VBScript Usage: object.CtlEnabled = "1"
public static int EncryptionEnabled
Enables/disables the encryption of the ink.
Options:
0 |
Disabled |
1 |
Enabled |
C# Usage: object.EncryptionEnabled = "1";
public static 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 |
VBScript Usage: object.EncryptionAlgorithm = 3
public static string Encryptionkey
Sets the encryption key
VBScript Usage: object.Encryptionkey = "12345678"
public static int EnrollOptions
The number of signatures needed for setting up a template, either 3 or 6.
VBScript Usage: object.EnrollOptions = 3
public static string HashVal
Return the result(s) of the hashing done using InitHash, AddHash and FinishHash. Each hash value is a long integer.
VBScript Usage: object.HashVal
public static int InkColor
Sets/gets the current color of ink input.
VBScript Usage: object.InkColor = 255
public static int InkWidth
Sets/gets the current width of ink input.
VBScript Usage: object.InkWidth
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 |
VBScript Usage: object.Status
public static string Template
The template data. Access this property to save or restore the control's contents from disk or a database.
VBScript Usage: object.Template
public static int TimeOut
The timeout for the InkReady event in milliseconds.
VBScript Usage: object.TimeOut
public static int WritingGuide
Option of letter guide, signature guide or no guide.
Options:
0 |
wgNONE | No writing guide |
| 1 | wgUnderline | Specify the underline guide |
| 2 | wgSignatureLine | Specify the signature line guide |
VBScript Usage:
object.WritingGuide = 2
| Method Details |
public long AddHash(string sHash)
Adds string to be hashed to the current hashing session. The maximum length of a string is 32K bytes.
Returns:
0 |
Success |
| 100 | MaxLengthExceeded |
| 101 | Bad Mode |
VBScript Usage: object.AddHash(signature )
public void ClearSignature()
Clears the signature in the control.
VBScript Usage: object.ClearSignature
public void ConfirmSignature()
Confirm the current signature and make the template. Template result from this function could be obtained through Template property.
VBScript Usage: object.ConfirmSignature
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.
VBScript Usage: object.EnrollSignature
public long FinishHash()
Finalizes the hashing session and returns the result in HashVal1 through HashVal5.
Returns: Always returns Success = 0
VBScript Usage: object.FinishHash
public long HasInk( )
Returns whether or not control contains any ink.
Returns:
0 |
no ink |
| 1 | ink exists |
VBScript Usage: object.HasInk
public void InitHash()
Initiates a hashing session. Is used in conjunction with AddHash and FinishHash.
VBScript Usage: object.InitHash
public void ResetTemplate()
Resets the template to tsEmpty.
VBScript Usage: object.ResetTemplate
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.
VBScript Usage: object.SetHashAlgorithm (1)
| Event Details |
Occurs 750 milliseconds after the last pen-down point. The timeout can be changed using the Timeout property.
VBScript Usage: object_OnInkReady
OnStatusChanged(TemplateStatus status)
Called when the status of the template is changed.
VBScript Usage: object_OnStatusChanged
Occurs immediately when the pen is lifted at the end of a stroke.
VBScript Usage: object_OnStrokeReady