MultiCam Boards Documentation > MultiCam Documentation > MultiCam User Guide > Configuration Object > How to manage Security Features? > Code examples to manage Security Features > Checking the security key validity for a board

Checking the security key validity for a board

Setting the OemSafetyKey parameter to a an 8-bytes string instructs the driver that this security key is to be checked.

Subsequently getting the OemSafetyLock parameter returns a string TRUE if the security key recorded in the board matches the value entered with the parameter OemSafetyKey. Otherwise, the returned string is FALSE.

The targeted board is selected by DriverIndex=1. The security key is MY_NUM18.

Example

//Variables declaration

char Match[6];
MCSTATUS Status;

//Connecting to driver

Status = McOpenDriver(NULL);

//Entering the reference key number

Status = McSetParamStr(MC_BOARD + 1, MC_OemSafetyKey, "MY_NUM18");

//Checking for correspondence

McGetParamStr(MC_BOARD + 1, MC_OemSafetyLock, &Match, 6);
if (Match=="FALSE")
{

  //...
  //Rejection code
  //...

}

//Disconnecting from driver

Status = McCloseDriver();

The Status variable can be used for error checking.