openHiTLS API openHiTLS 0.1.0-Alpha1

◆ HITLS_GetRandom()

int32_t HITLS_GetRandom ( const HITLS_Ctx ctx,
uint8_t *  out,
uint32_t *  outlen,
bool  isClient 
)

Obtain the random number of the client and server during the handshake.

参数
ctx[IN] TLS connection handle
out[OUT] Random number obtained
outlen[OUT] Length of the input parameter out. If the length is greater than the maximum random number length, the value will be changed.
isClient[IN] True, obtain the random number of the client. False, obtain the random number of the server.
返回值
HITLS_SUCCESS,obtainingthe status succeeded. For details about other error codes, see hitls_error.h.