openHiTLS API openHiTLS 0.1.0-Alpha1

◆ CRYPT_EAL_PkeyComputeShareKey()

int32_t CRYPT_EAL_PkeyComputeShareKey ( const CRYPT_EAL_PkeyCtx pkey,
const CRYPT_EAL_PkeyCtx pubKey,
uint8_t *  share,
uint32_t *  shareLen 
)

Compute the shared key.

参数
pkey[IN] Key session
pubKey[IN] Public key session
share[OUT] Shared key
shareLen[IN/OUT] The input parameter is the share space length, and the output parameter is the valid share space length, the required space can be obtained by calling the CRYPT_EAL_PkeyGetKeyLen interface.
返回值
CRYPT_SUCCESS,ifsuccessful. For other error codes, see crypt_errno.h.