Protection interface
If the container with the interpreter contains the file interpreter_library_name.dat (hereinafter, the secret data file), the INCT_Connect interface is additionally passed to such an interpreter during initialization.
INCT_Connect - the interface that gives the interpreter access to the data from the secret data file. The data file is not extracted from the container and therefore can be read only through the interface passed to the interpreter.
The interpreter must be designed so that it works only after the check of the data received through the INCT_Connect interface has been passed. The places of the checks, their number and the algorithm are chosen by the developer.
Description of the interface methods:
| Method | Method description | Description of use |
|---|---|---|
| Get_Count | The function returns the number of bytes in the secret data file (integer). | Using these methods, check the data placed in the container by the interpreter developer against the data passed to the interpreter by the CAM system (they must match). Suppose the developer has placed in the container the file sample.dat (the interpreter library is called sample.dll) 5 bytes in size with the following bytes (hexadecimal): 01 02 03 04 05 The Get_Count function returns 5. Get_Data(0) returns 1, Get_Data(2) returns 3, Get_Data(4) returns 5. The Get_SCData method returns in the Data parameter a pointer to the memory containing the data 01 02 03 04 05. |
| Get_Data | The function returns the byte of the secret data file with the number given in the input parameter. Input parameter: Index (integer) - the number of the returned byte. Bytes are numbered from 0. Result: the byte of the secret data file with the number given in the Index parameter. | |
| Get_SCData | The method returns the pointer to the secret data from the file. Output parameter: Data (pointer) - the pointer to the secret data. |