diffieHellman.getPublicKey([encoding])


返回指定 encoding 中的 Diffie-Hellman 公钥。 如果提供了 encoding,则返回字符串;否则返回 Buffer

Returns the Diffie-Hellman public key in the specified encoding. If encoding is provided a string is returned; otherwise a Buffer is returned.