openHiTLS API openHiTLS 0.1.0-Alpha1

◆ CRYPT_Sm2CalcEcdhSharedSecretCallback

typedef int32_t(* CRYPT_Sm2CalcEcdhSharedSecretCallback) (HITLS_Sm2GenShareKeyParameters *sm2Params, uint8_t *sharedSecret, uint32_t *sharedSecretLen)

SM2 calculates the shared key based on the local key and peer public key.

参数
sm2Params[IN] Shared key calculation parameters
sharedSecret[OUT] Shared key
sharedSecretLen[IN/OUT] IN: Maximum length of the key padding OUT: Key length
返回值
0indicates success. Other values indicate failure.