openssl_pkey_derive

Supported Versions: PHP 7 >= 7.3.0, PHP 8
Computes shared secret for public value of remote and local DH or ECDH key
<?php openssl_pkey_derive(OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key, OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key, int $key_length = 0): string|false