Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 655 Bytes

key_export.exportJWK.md

File metadata and controls

27 lines (17 loc) · 655 Bytes

Function: exportJWK

💗 Help the project

exportJWK(key): Promise<JWK>

Exports a runtime-specific key representation (KeyLike) to a JWK.

example Usage

const privateJwk = await jose.exportJWK(privateKey)
const publicJwk = await jose.exportJWK(publicKey)

console.log(privateJwk)
console.log(publicJwk)

Parameters

Name Type Description
key Uint8Array | KeyLike Key representation to export as JWK.

Returns

Promise<JWK>