Skip to main content
Module

x/jose/index.ts>exportSPKI

"JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto in Node.js, Browser, Cloudflare Workers, Electron, and Deno.
Extremely Popular
Go to Latest
function exportSPKI
import { exportSPKI } from "https://deno.land/x/jose@v4.8.3/index.ts";

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

Examples

Usage

const spkiPem = await jose.exportSPKI(publicKey)

console.log(spkiPem)

Parameters

key: KeyLike

Key representation to transform to a PEM-encoded SPKI string format.

Returns

Promise<string>