crypto.diffieHellman(options)
options: {Object}privateKey: {KeyObject}publicKey: {KeyObject}
- Returns: {Buffer}
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).
Feedback
Was this page helpful?
很高兴听到! 请告诉我们,我们如何才能改善.
很遗憾听到这个消息。 请告诉我们,我们如何才能改善.
最后修改 April 16, 2020: 加密 (a75e592)