UNPKG

jose

Version:

JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes

20 lines (19 loc) 824 B
import type * as types from '../types.d.ts'; /** * Exports a public {@link !CryptoKey} or {@link !KeyObject} to a PEM-encoded SPKI string format. * * @param key Key to export to a PEM-encoded SPKI string format. */ export declare function exportSPKI(key: types.CryptoKey | types.KeyObject): Promise<string>; /** * Exports a private {@link !CryptoKey} or {@link !KeyObject} to a PEM-encoded PKCS8 string format. * * @param key Key to export to a PEM-encoded PKCS8 string format. */ export declare function exportPKCS8(key: types.CryptoKey | types.KeyObject): Promise<string>; /** * Exports a {@link !CryptoKey}, {@link !KeyObject}, or {@link !Uint8Array} to a JWK. * * @param key Key to export as JWK. */ export declare function exportJWK(key: types.CryptoKey | types.KeyObject | Uint8Array): Promise<types.JWK>;