Derive the DH shared secret from a peer public key (deprecated).
Declared in <openssl/dh.h>
[[deprecated]]
int
DH_compute_key(
unsigned char* key,
BIGNUM const* pub_key,
DH* dh);
Deprecated. Use of this entity is allowed but discouraged.
Number of bytes written, or -1 on error.
| Name | Description |
|---|---|
| key | Output buffer of at least DH_size(dh) bytes. |
| pub_key | Peer public value. |
| dh | DH object holding the private key and domain parameters. |