Download ROCKEY5 TIME USER GUIDE
Transcript
ROCKEY5 TIME USER GUIDE printf("\r\n RY5_Close()error,error code:%08X \r\n", retcode); return; } printf("\r\n RY5_Close() success, the No. %d dongle was closed\r\n", i); } 7.1.28 RY5_Update DWORD WINAPI RY5_Update(HANDLE handle, BYTE* pbuf, int len); Objective: Remote update the data on dongle. RY5_Open must be called to open the device before this function is called. Parameters: handle [in]Device handle, as same as the handle returned by RY5_Open *pBuf [in/out]The pointer points to the buffer for storing the data to be updated len [in]The data length Note: The data structure of update package: typedef struct { BYTE sn[8]; //hardware ID, FFFFFFFFFFFFFFFF represents no restriction of hardware ID BYTE type; //0: public key file 1: private key file 2: key file //3: the 1024 byte read only area BYTE item; //Item: 0‐8 (the key file for updating ) WORD offset; //offset address BYTE len; // the read‐in data length (<=115 byte) BYTE data[115]; // the 115 byte data block } UpdateData; The private key will be called to decrypt the update package when updating ROCKEY5 TIME. It needs to be ensured that the private key for remote updating is located in the dongle. The user can use the user tool in ROCKEY5 TIME to generate and import or use exsited API. Note that the remote public key is not recommended to write to the dongle. Copyright © Feitian Technologies Co. Ltd. Website: www.FTsafe.com 165