Files
jose/docs/functions/key_export.exportSPKI.md

999 B

Function: exportSPKI

💗 Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


â–¸ exportSPKI(key): Promise<string>

Exports a runtime-specific public key representation (KeyObject or CryptoKey) to a PEM-encoded SPKI string format.

Parameters

Name Type Description
key KeyLike Key representation to transform to a PEM-encoded SPKI string format.

Returns

Promise<string>

Example

const spkiPem = await jose.exportSPKI(publicKey)

console.log(spkiPem)