crypto.createDiffieHellman(prime[, primeEncoding][, generator][, generatorEncoding])
prime{string | Buffer | TypedArray | DataView}primeEncoding{string} The [encoding][] of theprimestring.generator{number | string | Buffer | TypedArray | DataView} Default:2generatorEncoding{string} The [encoding][] of thegeneratorstring.- Returns: {DiffieHellman}
Creates a DiffieHellman key exchange object using the supplied prime and an
optional specific generator.
The generator argument can be a number, string, or [Buffer][]. If
generator is not specified, the value 2 is used.
If primeEncoding is specified, prime is expected to be a string; otherwise
a [Buffer][], TypedArray, or DataView is expected.
If generatorEncoding is specified, generator is expected to be a string;
otherwise a number, [Buffer][], TypedArray, or DataView is expected.
Feedback
Was this page helpful?
很高兴听到! 请告诉我们,我们如何才能改善.
很遗憾听到这个消息。 请告诉我们,我们如何才能改善.
最后修改 April 16, 2020: 加密 (a75e592)