Home

USER MANUAL Sign&Pay™ API Reference

image

Contents

1. Format BYTE GetAllSettings unsigned char all Set int length Parameter all Set The buffer of all settings length The length of all settings Return Appendix A Example MSR GetAllSettings all Set amp length Function MSR GetSecureHeadFirmware Description Read firmware version of SecureHead Format BYTE MSR GetSecureHeadFirmware char sVersion int length Parameter sVersion The version string lenght The length of version string Return Appendix A Example MSR GetSecureHeadFirmware s Version amp len Function MSR ReviewSecureHeadPrePANID Description Review First N Digits in PAN which can be clear data Format BYTE MSR ReviewSecureHeadPrePANID unsigned char tNumber Parameter tNumber the first count in PAN Return Appendix A Example MSR ReviewSecureHeadPrePANID amp tNumber Function MSR ReviewSecureHeadPostPANID Description Review Last M Digits in PAN which can be clear data Format BYTE ReviewSecureHeadPostPANID unsigned char tNumber Parameter tNumber the last count in PAN Return Appendix A Example MSR ReviewSecureHeadPostPANID amp tNumber Function MSR ReviewSecureHeadMaskPAN Description Read character that used to mask PAN Format BYTE MSR ReviewSecureHeadMaskPAN unsigned char tChar Parameter tChar the character that used to mask PAN Return Appendix A Example MSR ReviewSecureHeadMaskPAN amp tChar Function MSR R
2. Function MSR GetDataOutputFormat Description Get SecureHead card data output format Format BYTE MSR GetDataOutputFormat unsigned char t Format Parameter t Format 0x30 SecureHead output clear card data with no LRC and there isn t data 0 047 in the end track if the track has no data exist 0x31 SecureHead output clear card data with LRC and there is a data OxOd in the end every track Return Appendix A Example MSR GetDataOutputFormat amp t Format Function MSR SetDataOutputFormat Description Set SecureHead card data output format Format BYTE MSR SetDataOutputFormat unsigned char t Format Parameter 0x30 SecureHead output clear card data with no LRC and there isn t data 0x0d in the end track if the track has no data exist 0x31 SecureHead output clear card data with LRC and there is a data Ox0d in the end every track Return Appendix A Example MSR SetDataOutputFormat 0x30 Function MSR SetOutputEncryptedFormat supported in firmware v1 00 027 and above Description Set securehead encrypted structure of outputting SecureHead output structure has two format one is default structure which Track 1 and Track 2 is encrypted together with AES or Tri DES and Track 3 is clear data the other is new format which every Track is individual encrypted with Aes or Tri DES Format BYTE MSR SetOutputEncryptedFormat unsigned char e Format Parameter e Format 0x30 Default original encrypt outpu
3. Function Pay SetSerialNumber Description Set Serial Number to device Format BYTE Pay SetSerialNumber char sNumber int length Parameter sNumber Serial Number string length The length of Serial Number string it must be eight Return Appendix A Example Pay SetSerialNumber IDTECH 2010 11 Function Pay GetVersion Description Get the version of device Format BYTE Pay GetVersion char sVersion int length Parameter sVersion The version string length The length of version string Return Appendix A Example Pay GetVersion Version amp length Function Pay ControlLED Description Control LED Format BYTE Pay ControILED BYTE Led BYTE R Led Parameter L Led 0x00 Left led is OFF 0x01 Left Red led is ON 0x02 Left Green led is ON 0x03 Left Red led is flash 0x04 Left Green led is flash R Led 0x00 Right led is OFF 0x01 Right Red led is ON 0x02 Right Green led is ON 0x03 Right Red led is flash 0x04 Right Green led is flash Return Appendix A Example Pay ControlLED 0x02 0x00 Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 5 of 47 User Manual Sign amp Pay API Guide Function Pay GenerateTone Description Generate tone with specified frequency and duration Format BYTE Pay GenerateTone int Frequenc
4. Parameter d Format 0x30 the unit always output clear card data if user don t load MSR DUKPT key or output encrypted card data with Data key if user had loaded MSR DUKPT key 0x31 the unit always output clear card data if user don t load MSR DUKPT key or output encrypted card data with PIN key if user had loaded MSR DUKPT key Return Appendix A Example MSR getDataPINorDataKey amp d Format Function MSR ManualInputCardData supported in firmware v1 00 027 and above Description Get manual input card data only support format of new structure with PIN key and no LRC to set for every track data Format BYTE MSR ManualInputCardData unsigned char CardData int Length Parameter CardData The buffer for output ISO ABA card data format Length The length of output data Return Appendix A Example MSR ManualInputCardData CardData amp Length PIN API Function PIN GetPINBlock Description Get encrypted PIN Format BYTE PIN GetPINBlock char EncryptedPIN int Length PIN PARAM p Param Parameter EncryptedPIN The encrypted PIN string Length The length of encrypted PIN string p Param Input parameters See Appendix B for more information Return Appendix A Example PIN GetPINBlock EncryptedPIN amp length p Param Function PIN GetEncryptedData Description Get encrypted data from keypad Format BYTE PIN GetEncryptedData bool s Type unsigned char EncryptedData int Length PIN PARAM p Param Parameter s Type End flag 0 Not t
5. Description Set the pen color used to draw line on the LCD Format BYTE uSign SetPenColo BYTE P_Widthl BYTE P_Width2 BYTE P Width3 BYTE P_Width4 BYTE Red BYTE C Green BYTE C Blue Parameter P Widthl P Width4 the pen s width 4 bytes long C Red C Green C Blue the pen s color 0 255 Return Appendix A Example uSign SetPenColor 0x01 0x00 0x00 0x00 0x00 0x00 0xff Function uSign DrawLine Description Draw line from point lt left gt lt top gt to lt right gt lt bottom gt using the pen Format BYTE uSign DrawLine int left int top int right int bottom Parameter left X coordinate of start point 3 19 gt left gt 0 top Y coordinate of start point 239 gt top gt 0 right X coordinate of end point 319 gt right gt 0 bottom Y coordinate of end point 239 gt bottom gt 0 Return Appendix A Example uSign DrawLine 0 0 319 239 Function uSign DrawRectangle Description Draw rectangle defined by top left point lt left gt lt top gt and bottom right point lt right gt lt bottom gt using the pen Format BYTE uSign DrawRectangle int left int top int right int bottom Parameter left X coordinate of start point 319 gt left gt 0 left lt right top Y coordinate of start point 239 gt top gt 0 top bottom right X coordinate of end point 319 gt right gt 0 bottom Y coordinate of end point 239 gt bottom gt 0 Return Appendix A Example uSign DrawRectangle 10 10 300 200 Functi
6. All rights reserved Page 12 of 47 User Manual Sign amp Pay API Guide Bit 2 Enabled Bit 3 Notify left X coordinate of top left point top Y coordinate of top left point right X coordinate of bottom right point bottom Y coordinate of bottom right point sLength specifies the strData length strData specifies the object s data For Button Data is the text showed on the button For Picture lt Data gt is the picture data Picture is arranged as top left point first and bottom right end Each point occupies three bytes defined as RED GREEN BLUE For Text Data is arranged as Font Height 1 byte Width 1 byte Weight 1 byte Italic 1 byte Underline 1 byte CharSet 1 byte TextColou RED GREEN BLUE TextBkMode 1 byte TextBkColour RED GREEN BLUE String For owner draw button Data is Font Height 1 byte Width 1 byte Weight 1 byte Italic 1 byte Underline 1 byte CharSet 1 byte GREEN BLUE TextBkMode 1 byte TextBkColour RED GREEN BLUE String Offset X Y 4 bytes String Return Appendix A Example uSign CreateRegion 0x04 0x01 0x0f 45 190 125 230 5 Clear Function uSign StartCapture Description Start capture using specified parameters Format BYTE uSign StartCaptur BYTE f Mode BYTE f Interval BYTE s Red BYTE s Green BYTE s BlueBYTE b Red BYTE b_Green BYTE b Blue Parameter f Mode specifies the capture mode 0x01 0x05 0x01 Out signa
7. 48 length of track 1 23 length of track 2 6B length of track 3 03 tracks 1 and 2 have masked clear data BF bit 7 1 KSN included Bit 6 0 no Session ID included so not level 4 encryption Bit 5 1 1rack 3 hash data present Bit 4 1 track 2 hash data present Bit 3 1 track 1 hash data present Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 45 of 47 User Manual Sign amp Pay API Guide Bit 2 1 track 3 encrypted data present Bit 1 1 track 2 encrypted data present Bit 0 1 track 1 encrypted data present Track 1 data masked length 0x48 252A343236362A2A2A2A2A2A2A2A393939395E42555348204A522F47454F52474520572E 4D525E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A 2A2A3F2A Track 1 masked data in ASCII Track 2 data in hex masked length 0x23 3B343236362A2A2A2A2A2A2A2A393939393D2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A3 F2A Track2 masked data in ASCII In this example there is no Track 3 data either clear or masked encrypted and hashed data is below Track 1 encrypted length 0x48 rounded up to 8 bytes 0x48 72 decimal DA7F2A52BD3F6DD8B96CS50FC39C7E6A F22F06ED F033 BEOFB23D6BD33DCS5A1F8 08512F7AE18D47A60CC3F4559B 1 B093563BE7E07459072ABF8FAAB5338C6CC88 15 87797 7 Track 2 encrypted length 0x32 rounded up to 8 bytes 0x38 56 decimal AB3B10A3FBC230FBFB941FAC9E8264998 1 AE79F2632156E775A06AEDAFAF6F0A 184318 5209 55 Track 3 encry
8. CalibrateDevice Parameter None Return Appendix A Example uSign CalibrateDevice Function uSign SetClipArea Description Set new clip area The max area is 0 0 319 239 Format BYTE uSign SetClipArea int 1 top nt rightint bottom BYTE ShowMode BYTE C Red BYTE C Green BYTE C Blue Parameter left X coordinate of top left point top Y coordinate of top left point right X coordinate of bottom right point bottom Y coordinate of bottom right point ShowMode a bitmap for 4 lines Bit 1 for left line Bit 2 for right line Bit 3 for top line and Bit 4 for bottom line Value 1b means show this line Ob means don t show this line C Red The color of rectangle lines 0 255 C Greem The color of rectangle lines 0 255 C Blue The color of rectangle lines 0 255 Return Appendix A Example uSign SetClipArea 20 70 300 160 8 255 255 255 Function uSign CreateRegion Description Create object like picture button and text showed on LCD when during signature The object can be notified when touched Format BYTE uSign CreateRegion BYTE ID BYTE type BYTE state int left int top int right int bottom int sLength char strData Parameter ID specifies the region s ID type specifies the region s type 1 byte 0x01 means BUTTON 0x02 means PICTURE and 0x03 means TEXT 0x04 means owner draw button state specifies the region s state Bit 0 Exists Bit 1 Visable Copyright 2010 2011 International Technologies amp Systems Corp
9. Return Appendix A Example MSR SetEncryptedData tData length Function MSR LoadDeviceKey Description Change Fix Key If you want to change Fix key you must execute the API function MSR GetEncryptedData Get 8 bytes Random Data and encrypt Random data with Fix key of SecureHead then send encrypt data to SecureHead If all is ok this command can be executed success Format BYTE MSR LoadDeviceKey unsigned char tKey int length Parameter tKey The buffer of device key length The length of device key it must be 16 Return Appendix A Example MSR LoadDeviceKey tKey length Function MSR GetSecurityLevel Description Read out SecureHead Security level Format BYTE MSR GetSecurityLevel unsigned char t Level Parameter t Level 0x30 Security Level 0 0x31 Security Level 1 0x32 Security Level 2 0x33 Security Level 3 Return Appendix A Example MSR GetSecurityLevel t Level Function MSR GetMSROutputStatus Description Get SecureHead card data output model Format BYTE MSR_GetMSROutputStatus unsigned char t Status Parameter t Status 0x30 SecureHead output card data with clear data 0x31 SecureHead output card data with masked data Return Appendix A Example MSR GetMSROutputStatus t Status Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 21 of 47 User Manual Sign amp Pay API Guide
10. feature is enabled the key management method used is fixed key Return Appendix A Example GetDecodingSetting amp t Dec Function SetDecodingSetting Description Set decoding method for SecureHead Format BYTE MSR SetDecodingSetting unsigned char t Dec Parameter t Dec 0x30 Raw Data Decoding in Both Directions send out in ID TECH mode 0x31 Decoding in Both Directions If the encryption feature is enabled the key management method used is DUKPT 0x32 Moving stripe along head in direction of encoding If the encryption feature is enabled the key management method used is DUKPT 0x33 Moving stripe along head against direction of encoding If the encryption feature is enabled the key management method used is DUKPT 0x34 Raw Data Decoding in Both Directions send out in other mode Its format is lt 0 01 gt lt 0 01 gt lt 0 1 gt lt 0 02 gt 0x00 lt 8 bytes Device Serial Number lt 0x30 lt 0 31 gt lt 264 bytes of Sampling data gt If the encryption feature is enabled the key management method used is fixed key Return Appendix A Example MSR SetDecodingSetting t Dec Function MSR GetAllSettings Description Get all settings of SecureHead Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 17 of 47 User Manual Sign amp Pay API Guide
11. of a char Width specifies the width of a char Weight specifies the weight of the char Italic specifies the italic of the char Underline specifies the underline of the char CharSet specifies the char set 1 byte The valid size is 1 6 Return Appendix A Example uSign SetFont 0x10 0x0C 0x10 0x00 0x00 0x03 Function uSign SetTextColor Description Set the text s color Format BYTE uSign SetTextColor BYTE Green BYTE Blue Parameter C Red the text s color 0 255 C Green the text s color 0 255 C Blue the text s color 0 255 Return Appendix A Example uSign SetTextColor 0 0 0xff Function uSign SelectBackgroundMode Description Set the background mode for text display on the LCD Format BYTE uSign SelectBackgroundMode BYTE F Mode Parameter F Mode specifies background mode 1 byte 0x00 means OPAQUE and others means TRANSPARENT Return Appendix A Example uSign SelectBackgroundMode 0x01 Function uSign SetBackgroundColor Description Set the background color when display text on the LCD Format BYTE uSign SetBackgroundColor BYTE Red BYTE C Green BYTE C Blue Parameter C Red the backgound s color 0 255 C Green the backgound s color 0 255 C Blue the backgound s color 0 255 Return Appendix A Example uSign SetBackgroundColor 255 255 255 Function uSign DrawString Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 9 of 47 User Manu
12. 01 0x00 0x00 0x00 0x00 0x00 0xff uSign DrawLine BYTE res uSign DrawLine 0 0 319 239 uSign DrawRectangle res uSign DrawRectangle 10 10 300 200 uSign DrawArc res uSign DrawArc 1 1 200 0 6000 uSign BrushColor res uSign BrushColor 0xFF Oxff Oxff uSign FillRectangle res uSign FillRectangle 0 0 319 239 uSign FillArc res uSign FillArc 1 1 200 0 6000 uSign SetFont Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 27 of 47 User Manual Sign amp Pay API Guide res uSign SetFont 0x10 0x0C 0x10 0x00 0x00 0x03 uSign SetText res uSign SetTextColor 0 0 0xff uSign SelectBackgroundMode res uSign SelectBackgroundMode 0x01 uSign SetBackgroundColor res uSign SetBackgroundColor 255 255 255 uSign GetPicture BYTE res 0 BYTE rec 240000 unsigned int rlen 0 res uSign GetPicture 0 0 20 20 rec 240000 amp rlen uSign ClearSignature p Count 0 p Draw 0 m pArray RemoveAIl Invalidate TRUE BYTE res uSign ClearSignature uSign ExitCapture BYTE res uSign ExitCapture uSign ShowPicture BYTE pData 2000 BYTE res uSign ShowPicture 10 10 20 20 pData 2000 uSign StorePicture BYTE pData 3000 BYTE res uSign StorePicture 1 1 pData 3000 uSign ShowStorePicture BYTE res uSign ShowStorePicture 1 0 0 319 239 PIN CancelPIN BYTE res PIN CancelPIN PIN GetKey m Key
13. 011 International Technologies amp Systems Corp All rights reserved Page 35 of 47 User Manual Sign amp Pay API Guide PIN INPUT struct is defined Font 6 bytes gt lt Text Color R G B total 3 bytes gt lt Background Mode 1 byte Backgroud color R B total 3 bytes X0 2 bytes gt lt Y0 2 bytes X1 2 bytes gt lt Y1 2 bytes gt lt Show Mode 1 byte typedef struct BYTE f Height BYTE f Width BYTE f Weight BYTE f Italic BYTE f Underline BYTE f CharSet BYTE t Red BYTE t Green BYTE t Blue BYTE b Mode BYTE b Red BYTE b Green BYTE b Blue intx Start int y Start int x End int y End BYTE Show Mode PIN INPUT typedef struct BYTE k Type 70 Master key Session key 1 DUKPT BYTE k MaxLen the max length of input PIN BYTE k MinLen the min length of input PIN char k Account 16 ASCII code for digital 0x30 0x39 or NULL BYTE LCD Status LCD status BYTE b Red Background Color BYTE b Green Background Color BYTE b Blue Background Color PIN INPUT p Input BYTE m Number PIN MSG p Message 10 PIN PARAM Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 36 of 47 User Manual Sign amp Pay API Guide Appendix C MagStripe Card Data Output Format Unencrypted MSR Data Output Format Track 1 lt SS1 gt lt T Data ES CR Track 2 lt SS2 gt lt T Data gt lt ES gt
14. 0x00 p Input f CharSet 0x05 p Input t Blue p Input t Green p Input t Red 0x00 p Input b Mode 0x01 p_Input b_Blue p Input b Green p Input b Red Oxff p Input x Start 5 p Input y Start 96 p Input x End 310 p Input y End 144 p Input Show Mode 0 0 Imsg 1 2 z ziz z z z z z p_Msg 0 b_Red p Msg 1 b Red Oxff p Msg 0 b Green p Msg 1 b Green Oxff p Msg 0 b Blue p Msg 1 b Blue Oxff p Msg 0 x Start 64 p Msg 0 y Start 32 p Msg l x Start 6 p Start 180 if pthis gt m_rPIN 0 1 p Msg 0 s Message Enter PIN if pthis gt m_rPIN 1 1 p Msg 0 s Message Numeric PIN Copyright 2010 2011 International Technologies amp Systems Corp rights reserved Page 31 of 47 User Manual Sign amp Pay API Guide if pthis gt m_rPIN 2 p Msg 0 s Message Amount PIN p Msg 1 s Message Press Enter Key When Done p Param k Type 0x31 p Param k MaxLen 0x0c p Param k MinLen 0x04 p Param k Account 0123456789123456 p Param LCD Status 0x03 p Param b Red Oxff p Param b Green Oxff p Param b Blue 0xcc p Param m Number 2 p Param p Input p Input p Param p Message 0 p Msg 0 p Param p 1 p_Msg 1 if pthis gt m_rPIN 0 1 res PIN GetPINBlock EncryptedPIN amp length p Param if pthis gt m_rPIN 1 1 if pthis ReadNumericPrivateKeys amp Private k
15. 2555348204A522F47454F52474520572E4D52 5E303830393 1303 131303030303 13130303030303030303034363030303030303F21 Track 2 decrypted data in hex including padding zeros 3B3432363638343 13038383838393939393D303830393 130313 1303030303034363F300000000 000 Track 3 decrypted data in hex including padding zeros 3B333333333333333333333736373637363037303730373736373637363333333333333333333 337363736373630373037303737363736373633333333333333333333373637363736303730373 037373637363 73633333333333333333333373637363736303730373F320000000000 Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 47 of 47
16. 676760707077676763333333333767676070707767676333333333376767607070 77676763333333333767676070792 Key Value F8 2A 7A 0D 7C 67 46 F1 96 189A 54 2C 65 A3 KSN 62 99 49 01 19 00 00 00 00 01 Decrypted Data in ASCII 90B4266841088889999 BUSH JR GEORGE W MR 0809101100001100000000046000000 4266841088889999 080910110000046 0 333333333337676760707077676763333333333767676070707767676333333333376767607070 Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 40 of 47 User Manual Sign amp Pay API Guide 716767633333333337676760707 2 Decrypted Data in Hex 25423432363638343 13038383838393939395E42555348204A522F47454F52474520572E4D52 5E303830393 1303 131303030303 13130303030303030303034363030303030303F213B3432363 638343 13038383838393939393D303830393 1303 131303030303034363F300000000000 Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 41 of 47 User Manual Sign amp Pay API Guide Enhanced Encryption Format This mode is used when all tracks must be encrypted or encrypted OPOS support is required or when the tracks must be encrypted separately or when cards other than type 0 ABA bank cards must be encrypted or when track 3 must be encrypted This format is the standard encryption format but not yet the default encryption format Card data is sent out in the following format lt STX gt lt LenL gt lt LenH gt lt Card Data gt lt CheckLRC gt l
17. Appendix A Example MSR GetKeyModel amp t mKey Function MSR SetKeyModel Description Set model of key management Format BYTE MSR SetKeyModel unsigned char t mKey Parameter t mKey 0x30 Fixed Key 0x31 DUKPT Key Return Appendix A Example MSR SetKeyModel t mKey Function MSR GetEncryptedData Description Get 8 bytes of TDES encrypted random data Then use FIX key of SecureHead to encrypte these bytes and send the result to SecureHead If these steps are ok then SecureHead allow you to change FIX key Format BYTE MSR GetEncryptedData unsigned char tData int length Parameter tData The buffer of 8 bytes of TDES encrypted random data length The length of 8 bytes of TDES encrypted random data it is always 8 Return Appendix A Example MSR GetEncryptedData tData amp length Function MSR SetEncryptedData Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 20 of 47 User Manual Sign amp Pay API Guide Description Send external authenticate data to SecureHead Format BYTE MSR SetEncryptedData unsigned char tData int length Parameter tData The buffer of external authenticate data After executing the API function MSR GetEncryptedData then get 8 bytes random data and encrypt these data with Fix key of SecureHead length The length of external authenticate data it must be 8
18. BYTE uSign GetPicture int leftint top int right int bottom BYTE p Data unsigned int sLength unsigned int rLength Parameter left X coordinate of top left point top Y coordinate of top left point right X coordinate of bottom right point bottom Y coordinate of bottom right point p Data Get picture data sLength The length of p Data buffer rLength The length of getting picture data Return Appendix A Example uSign_GetPicture 0 0 20 20 rec 240000 amp rlen Function uSign ShowPicture Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 10 of 47 User Manual Sign amp Pay API Guide Description Show picture on the LCD defined by top left point lt left gt lt top gt and bottom right point lt right gt lt bottom gt Format BYTE uSign ShowPicture int leftint top int right int bottom BYTE p Data unsigned int sLength Parameter left X coordinate of top left point top Y coordinate of top left point right X coordinate of bottom right point bottom Y coordinate of bottom right point P Data The picture data sLength The length of picture data Return Appendix A Example uSign ShowPicture 0 0 20 20 p Data rlen Function uSign StorePicture Description Store picture in the device Format BYTE uSign StorePictur BYTE ID BYTE type BYTE p Data unsigned int sLength Parame
19. IDT CH Value through Innovation USER MANUAL Sign amp Pay API Reference Guide V1 05 80098501 001 A Sept 27 2011 User Manual Sign amp Pay API Guide Target Device Sign amp Pay Description Support Sign amp Pay device USBHID and RS232 interface Platform Microsoft Windows XP Windows 2000 Vista DLL Usage Microsoft Visual C 6 0 Add Sign PayKit lib to Project gt Settings gt Link gt Object library modules and include the head file Sign PayKit h then call the DLL function directly Command Summary All commands supported are listed below Pay OpenHid Pay OpenPort Pay Close Pay GetSerialNumber Pay SetSerialNumber Pay GetVersion Pay ControlLED Pay GenerateTone Pay ControlAudio Pay GetSdkVersion Pay ReSet Pay GetModelNumber uSign SetPenColor uSign DrawLine uSign DrawRectangle uSign DrawArc uSign BrushColor uSign FillRectangle uSign FillArc uSign SetFont uSign SetTextColor uSign SetBackgroundColor uSign SelectBackgroundMode uSign DrawString uSign DrawStringInRectangle uSign GetPicture uSign ShowPicture uSign StorePicture uSign ShowStorePicture uSign RetrieveStorePicture Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 2 of 47 User Manual Sign amp Pay API Guide uSign CalibrateDevice uSign SetClipArea uSign CreateRegion uSign StartCapture uSign AddPointHandle uSign ContinueCapture uSign PauseCapture uSign GetPoin
20. PIN MODEL 203 CLEAR TEXT MODEL 204 MSR MODEL 205 USIGN MODEL 206 KEY FUNCT MODEL 207 ENCRYPTED DATA MODEL Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 34 of 47 User Manual Sign amp Pay API Guide Appendix B Input Parameter Structure typedef struct unsigned short int bits unsigned char modulu MAX RSA MODULUS _ LEN unsigned char exponent MAX RSA MODULUS LEN R RSA PUBLIC KEY private key include p q d mod p 1 d mod q 1 q 1 mod p typedef struct unsigned short int bits unsigned char modulus MAX RSA MODULUS LEN unsigned char publicExponent MAX RSA MODULUS LEN unsigned char exponent MAX RSA MODULUS LEN unsigned char prime 2 MAX RSA PRIME LEN unsigned char primeExponent 2 MAX RSA PRIME LEN unsigned char coefficientI MAX RSA PRIME LEN R RSA PRIVATE KEY PIN MSG struct is defined Message Length includes self 2 bytes gt lt gt lt Font 6 oytes gt lt Text Color R G B total 3 bytes gt lt Background Mode 1 byte gt lt Backgroud color R G B total 3 bytes lt 2 bytes gt lt Y 2 bytes gt lt String Length 2 bytes gt lt String gt typedef struct BYTE f Height BYTE f Width BYTE f Weight BYTE f Italic BYTE f Underline BYTE f CharSet BYTE t Red BYTE t Green BYTE t Blue BYTE b Mode BYTE b Red BYTE b Green BYTE b Blue int x Start int y_Start char s Message MSG Copyright 2010 2
21. See Appendix B for more information PrivateKey Key parameters See Appendix B for more information Return Appendix A Example PIN GetNumericOrAmount 1 EncryptedPIN amp length p Param p Key Function PIN GetKey Description Get one Key Pad buffered pressed non numeric key Format BYTE PIN GetKey char Key int Length Parameter Key The non numeric key string Length The length of non numeric key string Return Appendix A Example PIN GetKey Key amp Length Function PIN ClearKey Description Clear Key Pad buffer Format BYTE PIN ClearKey Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 25 of 47 User Manual Sign amp Pay API Guide Parameter None Return Appendix A Example PIN ClearKey Function PIN GetCardAccount Description Get card account Format BYTE GetCardAccount unsigned char EncryptedData int Length PIN PARAM p Param Parameter EncryptedData The buffer of Encrypted data SessionID and KSN SessionID is only used at security level 4 of SecureHead it is part of the encrypted data KSN is a 10 bytes string in the case of fix key management use serial number plus two bytes null characters instead of KSN Length The length of data p Param Input parameters See Appendix B for more information Return Appendix A Example PIN GetCardAccount EncryptedData amp Length p P
22. al Sign amp Pay API Guide Description Draw string using the selected font and colors on the LCD Format BYTE uSign DrawString int left int top int sLength char strData Parameter left specifies the X coordinate of the start point top specifies the Y coordinate of the start point sLength specifies the length of the string in chars strData specifies the string to be displayed Return Appendix A Example uSign DrawString 35 140 len str Function uSign DrawStringInRectangle Description Draw string using the selected font and colors on the LCD The string will be displayed in the specified rectangle from the top left of the rectangle to the right bottom of the rectangle Format BYTE uSign DrawStringInRectangle int left int top int right int bottom int sLength char strData Parameter left specifies the X coordinate of the start point top specifies the Y coordinate of the start point right specifies the X coordinate of the end point bottom specifies the Y coordinate of the end point sLength specifies the length of the string in chars strData specifies the string to be displayed Return Appendix A Example uSign DrawStringInRectangle 0 0 40 140 len str Function uSign GetPicture Description Get picture on the LCD defined by top left point lt left gt lt top gt and bottom right point lt right gt lt bottom gt Format
23. ameter func The name of call back function pParam The currently pointer Return Appendix A Example MSR AddDataHandle Data Handle this Function MSR GetOutputSetting Description Get outputting setting of SecureHead Format BYTE MSR GetOutputSetting unsigned char t Out Parameter t Out 0x30 SecureHead Outputting Disabled 0x31 SecureHead Outputting Enabled Return Appendix A Example MSR GetOutputSetting amp t Out Function MSR_GetDecodingSetting Description Get decoding method of SecureHead Format BYTE MSR_GetDecodingSetting unsigned char t_Dec Parameter t Dec 0x30 Raw Data Decoding in Both Directions send out in ID Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 16 of 47 User Manual Sign amp Pay API Guide TECH mode 0x31 Decoding in Both Directions If the encryption feature is enabled the key management method used is DUKPT 0x32 Moving stripe along head in direction of encoding If the encryption feature is enabled the key management method used is DUKPT 0x33 Moving stripe along head against direction of encoding If the encryption feature is enabled the key management method used is DUKPT 0x34 Raw Data Decoding in Both Directions send out in other mode Its format is lt 0 01 gt lt 0x01 gt lt 0 1 gt lt 0 02 gt 0x00 lt 8 bytes Device Serial Number lt 0x30 0x31 264 bytes of Sampling data If the encryption
24. aram Function PIN InvalidateKey Description Make the numeric key and account key invalid Format BYTE PIN InvalidateKey Parameter None Return Appendix A Example PIN InvalidateKey Example for DLL call include head file include uSign PayKit h add Lib uSign PayKit lib Add uSign PayKit lib to Project gt Settings gt Link gt Object library Call DLL functions using single thread method Pay OpenHid BYTE res Pay OpenHid 0x0ACD 0x2310 Pay Close BYTE res Close Pay_GetSerialNumber char Serial 128 m_GetSerial int length 0 Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 26 of 47 User Manual Sign amp Pay API Guide BYTE res Pay GetSerialNumber Serial amp length if res 1 for int 1 0 1 lt length i m_GetSerial Serial i j UpdateData FALSE Pay SetSerialNumber BYTE res Pay SetSerialNumber IDTECH 2010 11 Pay BYTE res ControlLED 0x02 0x00 GetSdkVersion char Serial 128 m GetSerial int length 0 BYTE res GetSdkVersion Serial amp length Pay GenerateTone res Pay GenerateTone 2000 300 Pay ControlAudio BYTE res Pay ControlAudio false Pay GetVersion char Version 128 m Version int length 0 BYTE res Pay GetVersion Version amp length uSign SetPenColor BYTE res uSign SetPenColor 0x
25. char key 128 int len 0 BYTE res PIN GetKey key amp len for int i 0 1 lt len i n m Key 1 UpdateData false PIN_ClearKey BYTE res PIN ClearKey MSR_ArmToRead BYTE res MSR_ArmToRead Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 28 of 47 User Manual Sign amp Pay API Guide if res 1 GetDlgItem IDC GETDATABUF EnableWindow true m Msr UpdateData false Call DLL functions using multi threads methods uSign StartCapture See Sign PayKitTest demo software for more information void stdcall point handle int buf int rev LPVOID pParam 1 CSign PayKitTestDlg pthis CSign PayKitTestDlg pParam pthis gt p_ Draw 0 memset pthis p Array 0 50 pthis SendMessage WM SWITCH UPDATE 0 0 CPoint p for int i 0 i lt rev buffit4 pthis gt m_pArray Add p pthis gt p_Count pthis gt p_Draw pthis gt ClearRect false pthis gt SendMessage WM_SWITCH_UPDATE 0 0 static UINT ThreadProc Capture LPVOID pParam CSign PayKitTestDlg pthis CSign PayKitTestDlg pParam int res uSign StartCapture 0x04 0x7A 0 0 0 255 255 255 TRACE Start capturing result d n res return 0 void CSign_PayKitTestDlg OnStartcapturing i TODO Add your control notification handler code here uSign AddPointHandle point handle this AfxBeginTh
26. decoded data present Bit 1 1 track 2 decoded data present Bit 2 1 track 3 decoded data present Bit 3 1 track 1 sampling data present Bit 4 1 track 2 sampling data present Bit 5 1 track 3 sampling data present Bit 6 7 Reserved for future use Note 3 Clear mask data sent status Field 8 Clear mask data sent status and field 9 Encrypted Hash data sent status will only be sent out in enhanced encryption format Field 8 Clear masked data sent status byte Bit 0 1 track 1 clear mask data present Bit 1 1 track 2 clear mask data present Bit 2 1 track 3 clear mask data present Bit 3 0 reserved for future use Bit 4 0 reserved for future use Bit 5 0 reserved for future use Note 4 Encrypted Hash data sent status Field 9 Encrypted data sent status Bit 0 1 track 1 encrypted data present Bit 1 1 track 2 encrypted data present Bit 2 1 track 3 encrypted data present Bit 3 1 track 1 hash data present Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 43 of 47 User Manual Sign amp Pay API Guide Bit 4 1 track 2 hash data present Bit 5 1 track 3 hash data present Bit 6 1 session ID present Bit 7 1 KSN present Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 44 of 47 User Manual Sign amp Pay API Guide Enhanced Encryption Format Decryption Example Example of decryp
27. eviewKSNAndCountID Description Review the Key Serial Number and Encryption Counter Format BYTE MSR ReviewKSNAndCountID unsigned char tData int length Parameter tData The buffer of Data includes the Initial Key Serial Number in the leftmost 59 bits and a value for the Encryption Counter in Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 18 of 47 User Manual Sign amp Pay API Guide the right most 21 bits length The length of tData Return Appendix A Example MSR ReviewKSNAndCountID tData amp length Function MSR SetSecureHeadPrePANID Description Set first N Digits in PAN which can be clear data Format BYTE MSR SetSecureHeadPrePANID unsigned char tNumber Parameter tNumber The first count in PAN Return Appendix A Example MSR SetSecureHeadPrePANID tNumber Function MSR SetSecureHeadPostPANID Description Set last M Digits in PAN which can be clear data Format BYTE MSR SetSecureHeadPostPANID unsigned char tNumber Parameter tNumber the last count in PAN Return Appendix A Example MSR SetSecureHeadPostPANID tNumber Function MSR SetSecureHeadMaskPAN Description Set character that used to mask PAN Format BYTE MSR SetSecureHeadMaskPAN unsigned char tChar Parameter tChar The character to mask PAN Return Appendix A Example MSR Se
28. ey 0 i AfxMessageBox Read private keys error return 0 res GetNumericOrAmount 1 EncryptedPIN amp length p Param Private key if pthis gt m_rPIN 2 i if pthis ReadNumericPrivateKeys amp Private key 0 1 AfxMessageBox Read private keys error return 0 res GetNumericOrAmount 2 EncryptedPIN Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 32 of 47 User Manual Sign amp Pay API Guide amp length p Param Private key if res 1 i for int j 0 j lt length j i pthis m PIN EncryptedPIN j pthis SendMessage WM SWITCH UPDATE 0 0 return 0 if res 108 pthis gt MessageBox KEYS_ NOT LOADED return 0 j void CSign PayKitTestDlg OnPin i TODO Add your control notification handler code here UpdateData true AfxBeginThread ThreadProc this Copyright 2010 2011 International Technologies amp Systems Corp rights reserved Page 33 of 47 User Manual Sign amp Pay API Guide Appendix A Return Value Return Value Description 0 FAIL 1 SUCCESS 99 PARAMETER ERR 100 COMMAND UNSUPPORTED 101 INVALID COMMAND 102 COMMAND PROCESS 103 TIME OUT 104 NO DATA AVAILABLE 105 ACTION CANCELED 106 ACTION ABORTED 107 WRONG KEY TYPE 108 KEYS NOT LOADED 109 DUKPT OVER 110 KEY EXIST 200 PORT OPENED 201 PORT CLOSED 202
29. lt CR gt Track 3 lt 553 gt lt Data ES CR where SS1 start sentinel track 1 96 SS2 start sentinel track 2 SS3 start sentinel track 3 for ISO for CDL for AAMVA ES end sentinel all tracks Start or End Sentinel Characters in encoding format which come before the first data character start and after the last data character end indicating the beginning and end respectively of data Track Separator A designated character which separates data tracks Terminator A designated character which comes at the end of the last track of data to separate card reads LRC Check character following end sentinel CDL Old California Drivers License format CR Carriage Return Note The lt CR gt characters shown above between tracks 1 amp 2 and 2 amp 3 denote the default character for this position the Track Separator position The CR characters shown for track 3 denotes the default character for this position the Terminator position Unencrypted MSR setting 0x30 clear text card data with no LRC Ox0d at the end of each data track only if it exists default setting 0x31 clear text card data with LRC 0x0d at the end of each track when the track data does not exist Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 37 of 47 User Manual Sign amp Pay API Guide Encrypted MSR Data Output Format Original Encryptio
30. n Format lt STX gt lt LenL gt lt LenH gt lt Card Data gt lt CheckLRC gt lt CheckSum gt lt ETX gt Where lt STX gt 02h lt ETX gt 03h lt LenL gt lt LenH gt is a two byte length of Card Data lt CheckLRC gt is a one byte Exclusive OR sum calculated for all Card Data lt CheckSum gt is one byte Sum value calculated for all Card data gt Card Data card data format is shown below ISO ABA Data Output Format card encoding type track status track 1 unencrypted length track 2 unencrypted length track 3 unencrypted length track 1 masked track 2 masked track 3 data track 1 encrypted track 2 encrypted track 3 encrypted track 1 hashed track 2 hashed DUKPT serial number Non ISO ABA Data Output Format card encoding type track status track 1 length track 2 length track 3 length track 1 data track 2 data track 3 data 0 ISO ABA 4 for Raw Mode bit 0 1 2 T1 2 3 decode bit 3 4 5 T1 2 3 sampling 1 byte 0 for no track1 data 1 byte 0 for no track2 data 1 byte 0 for no track3 data Omitted if in Raw mode Omitted if in Raw mode Omitted if in Raw mode AES TDES encrypted data AES TDES encrypted data Only used in Raw mode 20 bytes SHA1 Xor 20 bytes SHA1 Xor 10 bytes 1 AAMVA 3 Others bit 0 1 2 T1 2 3 decode bit 3 4 5 T1 2 3 sampling 1 byte 0 for no track1 data 1 byte 0 for no track2 data 1 byte 0 for no track3 data Copyrigh
31. o send back encrypted key entry Must followed by another Get encrypted data command End flag 1 Final key entry command Data will be encrypted and sent back All keys entered encrypted by DUKPT 3DES key When the encrypted data is decrypted it contains cleat text of all the EncryptedData Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 24 of 47 User Manual Sign amp Pay API Guide keys entered separated by Format First entered key string Second entered key string Last entered key string Length The length of encrypted Data string p Param Input parameters See Appendix B for more information Return Appendix A Example PIN_GetEncryptedData 0x01 EncryptedData amp Length gt p Param 1 Function PIN CancelPIN Description Cancel PIN enter state Format BYTE PIN CancelPIN Parameter None Return Appendix A Example PIN CancelPIN Function PIN GetNumericOrAmount Description Get pinpad input as numeric or amount Format BYTE PIN GetNumericOrAmount BYTE s Type char EncryptedPIN int Length PIN PARAM p Param R RSA PRIVATE KEY PrivateKey Parameter s Type Output PIN type it must be 1 or 2 1 numeric pinpad 2 amount pinpad EncryptedPIN The PIN string Length The length of PIN string p Param Input parameters
32. on uSign DrawArc Description Draw arc defined by center point radius start angle and sweep angle use pen Format BYTE uSign DrawArc int leftint top nt I Radius int I StartAngle int I SweepAngle Parameter left specifies the x coordinate of the center of the related circle top specifies the y coordinate of the center of the related circle I Radius specifies the radius of the related circle I StartAngle specifies the starting angle in degrees relative to the x axis Unit is 0 1 Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 7 of 47 User Manual Sign amp Pay API Guide I SweepAngle specifies the sweep angle in degrees relative to the starting angle Unit is 0 1 Return Appendix A Example uSign DrawArc 1 1 200 0 6000 Function uSign BrushColor Description Set the brush s color used to fill region on the LCD Format BYTE uSign BrushColor BYTE C Red BYTE C Green BYTE C Blue Parameter C Red the pen s color 0 255 C Green the pen s color 0 255 C Blue the pen s color 0 255 Return Appendix A Example uSign BrushColor 0xFEOxff Oxff Function uSign FillRectangle Description Fill rectangle define by top left point lt left gt lt top gt and bottom right point lt right gt lt bottom gt using the brush Format BYTE uSign FillRec
33. pted length Ox6B rounded up to 8 bytes 0 70 64 decimal 44A9CCF6A78AC240F791B63284E15B4019102BA6C505814B585816CA3C2D2F42 A99B1B9773EFIBII6E005B7CD8681860D174E6AD316A0ECDBC687115FC89360A EE7E430140A7B79 1589CCAADB6D6872B78433C3A25DA9DDAE83F12FEFAB530CE 405B701131D2FBAAD970248A45600093 Track 1 data hashed length 20 bytes 3418AC88F65E1DB7ED4D10973F99DFC8463FF6DF Track 2 data hashed length 20 bytes 113B6226C4898A9D355057ECAF11A5598F02CA31 Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 46 of 47 User Manual Sign amp Pay API Guide Track 3 data hashed length 20 bytes 688861C157C1CE2E0F72CE0F3BB598A614EAABBI1 KSN length 10 bytes 62994901190000000002 LCR check sum and ETX 06E203 Clear Masked Data in ASCII Track 1 4266 99990 BUSH JR GEORGE W M R k sk sk sk sk oR sie sie ie ie oie Fk Track 2 4266 0000 Key Value 1 99 4C 3E 09 D9 AC A9 BD 43 81 EF A3 34 KSN 62 99 49 01 19 00 00 00 00 02 Decrypted Data Track 1 decrypted 960B4266841088889999 BUSH JR GEORGE W MR 0809101100001100000000046000000 Track 2 decrypted 4266841088889999 08091011000004620 Track 3 decrypted 333333333337676760707077676763333333333767676070707767676333333333376767607070 77676763333333333767676070722 Track 1 decrypted data in hex including padding zeros but there are pad bytes here 25423432363638343 13038383838393939395E4
34. ption Set mask output format of card data in new structure Format BYTE MSR SetMaskOption bool f Trackl bool f Track2 bool f Track3 Parameter f Track1 Track1 mask data allow to send when encrypted f Track2 Track2 mask data allow to send when encrypted f Track3 Track3 mask data allow to send when encrypted Return Appendix A Example MSR SetMaskOption true true true Function MSR SetDataPINorDataKey supported in firmware v1 00 027 and above Description Set the unit card encrypted data output format with PIN key or Data key Format BYTE MSR SetDataPINorDataKey unsigned char Format Parameter d Format 0x30 The unit always output clear card data if user don t load MSR DUKPT key or output encrypted card data with Data key if user had loaded MSR DUKPT key 0x31 The unit always output clear card data if user don t load MSR DUKPT key or output encrypted card data with PIN key if user had loaded MSR DUKPT ke Return Appendix A Example MSR SetDataPINorDataKey 0x30 Function MSR getDataPINorDataKey supported in firmware v1 00 027 and above Description Get the unit card endrypted data output format with PIN key or Data key Format BYTE MSR getDataPINorDataKey unsigned char d Format Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 23 of 47 User Manual Sign amp Pay API Guide
35. re using specified parameters Format BYTE uSign ContinueCapture Parameter None Return Appendix A Example uSign ContinueCapture Function uSign PauseCapture Description Pause capture Format BYTE uSign PauseCapture unsigned int p Count Parameter P Count The current point count Return Appendix A Example uSign PauseCapture amp p Count Function uSign GetPointCount Description Get script point count Format BYTE uSign GetPointCount unsigned int p Count Parameter P Count The point count Return Appendix A Example uSign GetPointCount amp p Count Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 14 of 47 User Manual Sign amp Pay API Guide Function uSign ClearSignature Description Clear signature Format BYTE uSign ClearSignature Parameter None Return Appendix A Example uSign ClearSignature Function uSign ExitCapture Description Exit signature Format BYTE uSign ExitCapture Parameter None Return Appendix A Example uSign ExitCapture Function uSign GetSignFormat Description Get buffered signature data Format BYTE uSign GetSignFormat int s Type BYTE Sign Data unsigned int sLength unsigned int rLength Parameter s Type signature format 1 SIG format 2 CMP format 3 RAW format 4 BMP format Sign Data signature data buffer sLeng
36. read ThreadProc Capture this j SecureHead data void stdcall SecureHead handle unsigned char buf int rev LPVOID pParam Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 29 of 47 User Manual Sign amp Pay API Guide 1 CSign PayKitTestDlg pthis CSign PayKitTestDlg pParam pthis m Track CString str pthis gt Parse TDES Data buf rev TDES please see Sign PayKitTest demo for more information static UINT ThreadProc MSR LPVOID pParam 1 CSign PayKitTestDlg pthis CSign PayKitTestDlg pParam int res 0 res MSR GetEncryption amp pthis m Encrypt res MSR EnableSecureHead return 0 void CSign PayKitTestDlg OnGetdatabuf 1 TODO Add your control notification handler code here MSR AddDataHandle SecureHead handle this AfxBeginThread ThreadProc MSR this PIN GetPINBlock static UINT ThreadProc LPVOID pParam i CString temp CSign PayKitTestDlg pthis CSign PayKitTestDlg pParam R RSA PRIVATE KEY Private key char EncryptedPIN 256 int length 0 BYTE res 0 pthis m PIN PIN INPUT p Input PIN MSG p Msg 2 PIN PARAM p Param hnput p Input f Height 0x16 p Input f Width 0x18 p Input f Weight 0x00 Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 30 of 47 User Manual Sign amp Pay API Guide p Input f Italic 0x00 p Input f Underline
37. t 2010 2011 International Technologies amp Systems Corp All rights reserved Page 38 of 47 User Manual Sign amp Pay API Guide Original Encryption Format Decryption Example Decryption of a three track ABA card with the original encryption format Sign amp Pay with default settings Original encryption format can be recognized because the high bit of the fourth byte underlined 00 is 0 027D01003F48236B252A343236362A2A2A2A2A2A2A2A393939395E42555348204A522F47 454F52474520572EA4D525E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2 A2A2A2A2A2A2A2A2A3F2A3B343236362A2A2A2A2A2A2A24A303939393D2A2A2A2A2 A2A2A2A2A2A2A2A2A2A2A3F2A3B333333333333333333333736373637363037303730373 736373637363333333333333333333337363736373630373037303737363736373633333333333 333333333373637363736303730373037373637363736333333333333333333333736373637363 03730373F32863E9E3DA28E455B28F7736B77E47A64EDDA 3BF03A06E44F3 1D1818COBC D7A353FB1AD70EFD30FFC3DA08A4FBC9372E57E8B40848BAEAA3FE724B3550E2F4B2 23E6BF264BEAE9E39142B648CDBS5 1FB8DAF8EA5B63913D29419B67582FCCCE9B37266 0F03668CC453216D9449C6B67EF33418AC88F65E1DB7ED4D10973F99DFC8463FF6DF 113 B6226C4898A9D355057ECAF11A5598F02CA3162994901190000000001399F03 STX Length LSB MSB card type track status length track 1 length track 2 length track 3 02 7D01 00 3F 48 23 6B The above broken down and interpreted 02 STX character 7D low byte of total length 01 high byte of total length 00 card type byte interpreta
38. t CheckSum gt lt ETX gt 0 STX Data Length low byte 2 Data Length high byte 3 Card Encode Type 4 Track 1 3 Status 5 Track 1 data length 6 Track2 data length 7 Track 3 data length 8 Clear masked data sent status 9 Encrypted Hash data sent status 10 Track 1 clear mask data Track 2 clear mask data Track 3 clear mask data Track 1 encrypted data Track 2 encrypted data Track 3 encrypted data Session ID 8 bytes Security level 4 only Track 1 hashed 20 bytes each if encrypted and hash track 1 allowed Track 2 hashed 20 bytes each if encrypted and hash track 2 allowed Track 3 hashed 20 bytes each if encrypted and hash track 3 allowed KSN 10 bytes CheckLRC CheckSum ETX Where lt STX gt 02h lt ETX gt 03h Note 1 Card Encode Type Card Type will be 8x for enhanced encryption format and Ox for original encryption format Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 42 of 47 User Manual Sign amp Pay API Guide Value Encode Type Description 00h 80h ISO ABA format 01h 81h format 03h 83h Other 04h 84h Raw un decoded format For Type 04 or 84 Raw data format all tracks are encrypted and no mask data is sent No track indicator 01 02 or 03 in front of each track Track indicator 01 02 and 03 will still exist for non encrypted mode Note 2 Track 1 3 status byte Field 4 Bit 0 1 track 1
39. t structure 0x31 enhanced encrypt output structure will send bytes 8 and 9 and CardType will be 1xxxxxxx high bit 1 Return Appendix A Example MSR_SetOutputEncryptedFormat 0x30 Function MSR SetEncryptOption supported in firmware v1 00 027 and above Description Set encrypted output format of card data in new structure Format BYTE MSR SetEncryptOption bool f Track1 bool f Track2 bool f Track3 bool f Other Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 22 of 47 User Manual Sign amp Pay API Guide Parameter f Trackl Track1 force encrypt f Track2 Track2 force encrypt f Track3 Track3 force encrypt f Other Track3 force encrypt when Card type is 0 Return Appendix A Example MSR SetEncryptOption true true true false Function MSR SetHashOption supported in firmware v1 00 027 and above Description Set hash output format of card data in new structure Format BYTE MSR SetHashOption bool f Track1 bool f Track2 bool f Track3 Parameter f Trackl Track1 hash will be sent if data is encrypted f Track2 Track2 hash will be sent if data is encrypted f Track3 Track3 hash will be sent if data is encrypted Return Appendix A Example MSR SetHashOption true true true Function MSR SetMaskOption supported in firmware v1 00 027 and above Descri
40. tCount uSign ClearSignature uSign ExitCapture uSign GetSignFormat uSign SetSignFormat MSR EnableSecureHead MSR DisableSecureHead MSR AddDataHandle MSR GetOutputSetting MSR GetDecodingSetting MSR SetDecodingSetting MSR GetAllSettings MSR GetSecureHeadFirmware MSR ReviewSecureHeadPrePANID MSR ReviewSecureHeadPostPANID MSR ReviewSecureHeadMaskPAN MSR ReviewKSNAndCountID MSR SetSecureHeadPrePANID MSR SetSecureHeadPostPANID MSR SetSecureHeadMaskPAN MSR SetExpirationData MSR SetEncryption MSR SerialNumber MSR GetKeyModel MSR SetKeyMode MSR GetEncryptedData MSR SetEncryptedData MSR LoadDeviceKey MSR GetSecurityLevel MSR GetMSROutputStatus MSR GetDataOutputFormat MSR SetDataOutputFormat MSR SetOutputEncryptedFormat supported in firmware v1 00 027 and above MSR SetEncryptOption supported in firmware v1 00 027 and above MSR SetHashOption supported in firmware v1 00 027 and above Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 3 of 47 User Manual Sign amp Pay API Guide MSR SetMaskOption supported in firmware v1 00 027 and above MSR SetDataPINorDataKey supported in firmware v1 00 027 and above MSR getDataPINorDataKey supported in firmware v1 00 027 and above MSR ManualInputCardData supported in firmware v1 00 027 and above IN GetPINBlock IN GetEncryptedData IN CancelPIN IN GetNumericOrAmount IN GetKey IN ClearKey IN GetCardAccount IN In
41. tSecureHeadMaskPAN tChar Function MSR SetExpirationData Description Display expiration data as mask data or clear data Format BYTE MSR SetExpirationData unsigned char t Mode Parameter t Mode 0x30 Display expiration data as mask data 0x31 Display expiration data as clear data Return Appendix A Example MSR SetExpirationData t Mode Function MSR SetEncryption Description Set securityalgorithm for SecureHead Format BYTE MSR SetEncryption unsigned char t Encry Parameter t Encry 0x30 Encryption Disabled 0x31 Enable TDES Encryption 0x32 Enable AES Encryption Not for Raw Data Decoding in Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 19 of 47 User Manual Sign amp Pay API Guide Both Directions send out in other mode Return Appendix A Example MSR SetEncryption t Encry Function MSR SerialNumber Description Read Serial Number of SecureHead Format BYTE MSR SerialNumber char sNumber int length Parameter sNumber The buffer of Serial Number string length The length of Serial Number string Return Appendix A Example MSR SerialNumber sNumber amp length Function MSR GetKeyModel Description Get model of key management Format BYTE MSR GetKeyModel unsigned char t mKey Parameter t mKey 0x30 Fixed Key 0x31 DUKPT Key Return
42. tangle int left int top int right int bottom Parameter left X coordinate of top left point left right top Y coordinate of top left point right X coordinate of bottom right point top lt bottom bottom Y coordinate of bottom right point Return Appendix A Example uSign FillRectangle 0 0 319 239 Function uSign FillArc Description Draw arc defined by center point radius start angle and sweep angle use brush Format BYTE uSign FillArc int leftint top int I Radius int I StartAngle int I SweepAngle Parameter left specifies the x coordinate of the center of the related circle top specifies the y coordinate of the center of the related circle I Radius specifies the radius of the related circle I StartAngle specifies the starting angle in degrees relative to the x axis Unit is 0 1 I SweepAngle specifies the sweep angle in degrees relative to the starting angle Unit is 0 1 Return Appendix A Example uSign FillArc 1 1 200 0 6000 Function uSign SetFont Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 8 of 47 User Manual Sign amp Pay API Guide Description Set the font for text display on the LCD Format BYTE uSign SetFont BYTE Height BYTE Width BYTE Weight BYTE Italic BYTE Underline BYTE CharSet Parameter Height specifies the height
43. ter ID the identifier for the picture type the picture s type 0x00 means RAW format 0x01 means 24 bit true color BMP format 0x02 means JPEG format P Data The picture data sLength The length of picture data Return Appendix A Example uSign StorePicture 0x01 0x02 p Data len Function uSign ShowStorePicture Description Show stored picture on the LCD defined by top left point lt left gt lt top gt and bottom right point lt right gt lt bottom gt Format BYTE uSign ShowStorePicture BYTE ID int left int top int right int bottom Parameter ID the identifier for the picture left X coordinate of top left point top Y coordinate of top left point right X coordinate of bottom right point bottom Y coordinate of bottom right point Return Appendix A Example uSign_ShowStorePicture 0x01 10 10 200 200 Function uSign RetrieveStorePicture Description Retrieve stored picture in the device Format BYTE uSign RetrieveStorePicture BYTE p ID int rLength Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 11 of 47 User Manual Sign amp Pay API Guide Parameter P ID The ID buffer two bytes for one ID rLength The length of p ID buffer Return Appendix A Example uSign RetrieveStorePicture p ID amp len Function uSign CalibrateDevice Description Calibrate the device Format BYTE uSign
44. th The length of signature data buffer rLength The length of signature data Return Appendix A Example uSign GetSignFormat 1 Sign Data 24000 amp len Function uSign SetSignFormat Description Send signature data to uSign Format BYTE uSign SetSignFormat int s Type BYTE Sign Data unsigned int sLength Parameter s Type signature format 1 SIG format 2 CMP format 3 RAW format 4 BMP format Sign Data signature data sLength The length of signature data Return Appendix A Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 15 of 47 User Manual Sign amp Pay API Guide Example uSign SetSignFormat 1 Sign Data 1000 MSR API Function MSR EnableSecureHead Description Enable SecureHead Format BYTE MSR EnableSecureHead Parameter None Return Appendix A Example MSR EnableSecureHead Function MSR DisableSecureHead Description Disable SecureHead Format BYTE MSR DisableSecureHead Parameter None Return Appendix A Example MSR DisableSecureHead Function MSR AddDataHandle Description Register a call back function for MSR EnableSecureHead function the function will be called when receiving SecureHead data please see Appendix C for more information about data format Format BYTE MSR AddDataHandle PMSR FUNC func LPVOID pParam Par
45. tion of a three track ABA card with the enhanced encryption format Sign amp Pay with default settings except enhanced encryption structure format Enhanced encryption Format this can be recognized because the high bit of the fourth byte underlined 80 is 1 029801803F48236B03BF252A343236362A2A2A2A2A2A2A2A393939395E42555348204A52 2F47454F52474520572E4DS25E2ZA2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2 A2A2A2A2A2A2A2A2A2A2A3F2A3B343236362A2A2A2A2A2A2A2A393939393D2A2A2 A2A2A2A2A2A2A2A2A2A2A2A2A3F2ADA7F2AS2BD3F6DD8B96C50FC39C7EGAF22F06 ED1F033BE0FB23D6BD33DC5A 1F808512F7AE18D47A60CC3F4559B1B093563BE7E0745 9072A BF8FAAB5338C6CC88 15FF87797AE3A 7BEAB3B 10A3FBC230FBFB941FAC9E8264 9981AE79F2632156E775A06AEDAFAF6F0A184318C5209E55AD44A9CCF6A78AC240F79 1B63284E15B4019102BA6C505814B585816CA3C2D2F42A99B1B9773EF1B116E005B7CD 8681860D174EGAD316A0ECDBC687115FC89360A EE7E430140A7B791589CCAADB6D687 2B78433C3A25DA9DDAES3FI2FEFAB530CE405B701131D2FBAAD970248A45600093341 8ACS88F65EIDB7EDAD10973F99DFC8463FF6DF113B6226C4898A9D355057ECAF11A5598 02 4 31688861 157 2 0 72 0 598 614 16299490119000000000206 2 03 STX Length LSB MSB card type track status length track 1 length track 2 length track 3 02 9801 80 3F 48 23 6B 03BF The above broken down and interpreted 02 STX character 98 low byte of total length 01 high byte of total length 80 card type byte interpretation new format ABA card 3F 3 tracks of data all good
46. tion old format ABA card 3F 3 tracks of data all good 48 length of track 1 23 length of track 2 6B length of track 3 Track 1 data masked length 0x48 252A343236362A2A2A2A2A2A2A2A393939395E42555348204A522F47454F52474520572E 4D525E2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A 2A2A3F2A Track 2 data in hex masked length 0x23 3B343236362A2A2A2A2A2A2A2A393939393D2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A3 F2A Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 39 of 47 User Manual Sign amp Pay API Guide Track 3 data unencrypted length 0x6B 3B333333333333333333333736373637363037303730373736373637363333333333333333333 337363736373630373037303737363736373633333333333333333333373637363736303730373 03737363736373633333333333333333333373637363736303730373F32 Track 1 amp 2 encrypted length 0x48 0x23 rounded up to 8 bytes 0x6B gt 0x70 112 decimal 863E9E3DA28E455B28F7736B77E47A64EDDA 3BF03A06E44F3 1D 1818COBCD7A35 3FB1AD70EFD30FFC3DA08A4FBC9372E57E8B40848BA EA A3FE724B3550E2F4B22 3E6BF264BEAE9E39142B648CDB51FB8DAF8EAS5B63913D29419B67582FCCCE9B3 72660F03668CC453216D9449C6B67EF3 Track 1 hashed 3418AC88F65EIDB7ED4D10973F99DFC8463FF6DF Track 2 hashed 113B6226C4898A9D355057ECAF11A5598F02CA31 KSN 62994901190000000001 LRC checksum and ETX 39 9F 03 Masked Data Track 1 data masked in ASCII Track 2 data masked in ASCII Track 3 data unencrypted in ASCII 333333333337
47. ture data using FBP format pen up is 0x8C and pen down is 0x9C 0x02 Out signature data the difference of the current point and previous point using FBP format pen up is 0x80 and pen down is 0x90 0x03 Out signature data using CMP format 0x04 Out signature data using FBP format pen up is 0x80 and pen down is 0x90 0x05 Data is buffered and not send out F interval specifies the maximum points interval during signature If Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 13 of 47 User Manual Sign amp Pay API Guide exceeds the signature will be cleared s Red specifies signature s color s Green specifies signature s color s Blue specifies signature s color b Red specifies background color b Green specifies background color b Blue specifies background color Return Appendix A Example uSign StartCapture 0x04 0x74 0 0 0 255 255 255 Function uSign AddPointHandle Description Register a call back function for StartCapture function the function will be called when receiving sign data Format BYTE uSign AddPointHandle PSIGN FUNC func LPVOID pParam Parameter func The name of call back function pParam The currently pointer Return Appendix A Example uSign AddPointHandle point handle this Function uSign ContinueCapture Description Continue captu
48. validateKey j d Uo w wow Y Function description General function API Function Pay OpenHid Description Open USBHID device Format BYTE OpenHid UINT auiVid UINT auiPid Parameter auiVid The Vendor ID auiPid The Product ID Return Appendix A Example Pay OpenHid 0x0A CD 0x2310 Function Pay OpenPort Description Open RS232 device Format BYTE Pay OpenPort int Comport long Baud char Parity int Stop int Data Parameter Comport Port number Baud Baud rate current baud rate is 38400 Parity Parity check curren parity is None stop Stop bit current stop is 1 data Data bit current data is 8 Return Appendix A Example Pay OpenPort 1 38400 N 1 8 Function Pay Close Description Close device Format bool Pay Parameter None Return Appendix A Example Pay Close Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 4 of 47 User Manual Sign amp Pay API Guide Function Pay GetSerialNumber Description Get the Serial Number of device Format BYTE Pay GetSerialNumber char sNumber int length Parameter sNumber Serial Number string length The length of Serial Number string Return Appendix A Example Pay GetSerialNumber Serial amp length
49. y int Duration Parameter Frequency 5 lt Frequency 40 000 Hz Duration 0 lt Duration lt 65536 mS Return Appendix A Example Pay GenerateTone 2000 300 Function Pay ControlAudio Description Sound control enable disable set Format BYTE Pay ControlAudio bool f Audio Parameter f Audio 0 disable 1 enable Return Appendix A Example Pay ControlAudio true Function Pay GetSdkVersion Description Get the version of SDK Format BYTE Pay GetSdkVersion char DllVersion int Length Parameter DilVersion The SDK version string Length The length of SDK version string Return Appendix A Example Pay GetSdkVersion Serial amp length Function Pay ReSet 355 9 Description ReSet the device Format BYTE Pay Parameter None Return Appendix A Example Pay ReSet Function Pay GetModelNumber Description Get the model number of device Format BYTE GetModelNumber char sNumber int length Parameter sNumber The mode number string length The length of mode number string Return Appendix A Example Pay GetModelNumber sNumber amp length Copyright 2010 2011 International Technologies amp Systems Corp All rights reserved Page 6 of 47 User Manual Sign amp Pay API Guide uSign function API Function uSign SetPenColor WES T

Download Pdf Manuals

image

Related Search

Related Contents

匹昆:a三 厚生労働省医薬食品専  Billion Electric Company CO1 Network Card User Manual  形CLS-BS 液面レベルスイッチ 取扱説明書 警 告    Sharkoon SATA QuickPort  洗髪・洗面化粧台  P5G41T-M LX2 Series  Xbrand XB-1009H-XX User's Manual  User manual - kralgroup.cz  Family Aqua Condens  

Copyright © All rights reserved.
Failed to retrieve file