Skip to content

crypto: ECDH convertKey to convert public keys between different formats

ECDH#convertKey is used to convert public keys between different formats, as per #18977 (closed)

ECDH#convertKey(key, curve[, inputEncoding[, outputEncoding[, format]]])

  • key <string> | <Buffer> | <TypedArray> | <DataView>
  • curve <string>
  • inputEncoding <string>
  • outputEncoding <string>
  • format <string> can be 'uncompressed', 'compressed', 'hybrid'

Returns the input key converted to the specified encoding and format.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

crypto, doc, test

Merge request reports

Loading