diffieHellman.generateKeys([encoding])


生成私钥和公钥 Diffie-Hellman 密钥值,并返回指定 encoding 中的公钥。 此密钥应转让给另一方。 如果提供了 encoding,则返回字符串;否则返回 Buffer

Generates private and public Diffie-Hellman key values, and returns the public key in the specified encoding. This key should be transferred to the other party. If encoding is provided a string is returned; otherwise a Buffer is returned.