ecdh.getPublicKey([encoding][, format])


format 参数指定点编码,可以是 'compressed''uncompressed'。 如果未指定 format,该点将以 'uncompressed' 格式返回。

如果指定了 encoding,则返回字符串;否则返回 Buffer

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.

If encoding is specified, a string is returned; otherwise a Buffer is returned.