Computes the Diffie-Hellman secret based on a privateKey and a publicKey. Both keys must have the same asymmetricKeyType, which must be one of 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).
Calculates and returns the signature for data
using the given private key and
algorithm. If algorithm
is null
or undefined
, then the algorithm is
dependent upon the key type (especially Ed25519 and Ed448).
If key
is not a [KeyObject
][], this function behaves as if key
had been
passed to [crypto.createPrivateKey()
][].
Calculates and returns the signature for data
using the given private key and
algorithm. If algorithm
is null
or undefined
, then the algorithm is
dependent upon the key type (especially Ed25519 and Ed448).
If key
is not a [KeyObject
][], this function behaves as if key
had been
passed to [crypto.createPublicKey()
][].
Generated using TypeDoc
since v10.0.0