![]()  | 
     BALTECH Docs | 
    C API for BALTECH SDK
   
    
   
   | 
   
| BRP_LIB brp_errcode brp_secured_recv_frm | ( | brp_protocol | protocol, | 
| int | sec_mode, | ||
| brp_sec_key | key, | ||
| brp_sec_iv | iv, | ||
| int | cmd_code, | ||
| brp_frame | resp_frm, | ||
| brp_time | timeout | ||
| ) | 
Sends an encrypted command.
This command is only for low-level usage. Instead of using it, it is recommended to use the high-level wrapper brp_create_secure_channel()
| protocol | device against which the library shall authenticate | 
| sec_mode | see BRP_SECMODE_ constants. By default BRP_SECMODE_STD | 
| key | the key that shall be used to establish a secure channel. Please note that this key is copied and stays in memory until calling brp_destroy(protocol) | 
| iv | next IV (has to be initialized to 00 ... 00 00). Is only relevant if BRP_SECMODE_STATELESS is not set (otherwise may be NULL). ATTENTION: This value will change and the changed value has to be passed to next brp_secured_send_frm()!!! | 
| cmd_code | Same as cmd_code in brp_secured_send_frm(). Required for correct error codes. | 
| resp_frm | Reference to a frame, where the response shall be stored (=added). | 
| timeout | maximum time to wait for response. If more time is required BRP_ERR_TIMEOUT |