ecdh.getPublicKey([encoding][, format])
encoding<string> 返回值的 编码。format<string> 默认:'uncompressed'- 返回:<Buffer> | <string> 指定
encoding和format的 EC Diffie-Hellman 公钥。
format 参数指定点编码,可以是 'compressed' 或 'uncompressed'。如果未指定 format,点将以 'uncompressed' 格式返回。
🌐 The format argument specifies point encoding and can be 'compressed' or
'uncompressed'. If format is not specified the point will be returned in
'uncompressed' format.
如果指定了 encoding,则返回一个字符串;否则返回一个 Buffer。
🌐 If encoding is specified, a string is returned; otherwise a Buffer is
returned.