Module

x/jose/key/export.ts>exportPKCS8

JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes.
Extremely Popular
Latest
function exportPKCS8
import { exportPKCS8 } from "https://dotland.deno.dev/x/jose@v5.9.6/key/export.ts";

Exports a runtime-specific private key representation ({@link !KeyObject} or {@link !CryptoKey}) to a PEM-encoded PKCS8 string format.

This function is exported (as a named export) from the main 'jose' module entry point as well as from its subpath export 'jose/key/export'.

Parameters

key: KeyLike

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

Returns

Promise<string>