diffieHellman.setPublicKey(publicKey[, encoding])
publicKey<string> | <Buffer> | <TypedArray> | <DataView>encoding<string>publicKey字符串的编码。
设置 Diffie-Hellman 公钥。
如果提供了 encoding 参数,则 publicKey 应该是字符串。
如果未提供 encoding,则 publicKey 应为 Buffer、TypedArray 或 DataView。
publicKey<string> | <Buffer> | <TypedArray> | <DataView>encoding<string> The encoding of thepublicKeystring.
Sets the Diffie-Hellman public key. If the encoding argument is provided,
publicKey is expected
to be a string. If no encoding is provided, publicKey is expected
to be a Buffer, TypedArray, or DataView.