Skip to main content

Function: parsePublicKey()

parsePublicKey(value): KeyObject

Accepts an Ed25519 public key as PEM (-----BEGIN PUBLIC KEY-----) or as raw base64-encoded SPKI, and returns a normalized KeyObject. Throws if the value is not a usable Ed25519 public key.

Parameters​

value​

string

Returns​

KeyObject