BN_mpi2bn (PrivateKey, 取字节集长度 (PrivateKey), bn)
EC_KEY_set_private_key (ec_key, bn)
BN_free (bn)
ec_group = EC_KEY_get0_group (ec_key)
ec_point = EC_POINT_new (ec_group)
EC_POINT_oct2point (ec_group, ec_point, peerRawPublicKey, 取字节集长度 (peerRawPublicKey), 0)
ECDH_compute_key (PublicKey, 16, ec_point, ec_key, 0)
返回 (十六进制文本到字节集 (取数据摘要 (PublicKey)))
下一篇 支持负数和无限精度的四则运算