![]()  | 
     BALTECH Docs | 
    C API for BALTECH SDK
   
    
   
   | 
   
| BRP_LIB brp_errcode brp_mutual_authenticate | ( | brp_protocol | protocol, | 
| int | security_level, | ||
| brp_sec_key | key, | ||
| int * | req_auth_modes, | ||
| brp_sec_key | session_key | ||
| ) | 
Does a mutual authentication and generates a session key.
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()
This lowlevel operation is usually used only internally by brp_create_crypto() and is not needed by end users.
| protocol | device against which the library shall authenticate | 
| security_level | security level that shall be authenticated | 
| key | the key that shall be used to establish a secure channel | 
| req_auth_modes | a bitmask of auth modes that are required | 
| session_key | session key that can be used by brp_secured_exec_cmd(). Maybe NULL, if sessionkey is not needed. |