mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
1.1 KiB
1.1 KiB
Function: exportJWK
💗 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.
â–¸ exportJWK(key): Promise<JWK>
Exports a runtime-specific key representation (KeyLike) to a JWK.
Parameters
| Name | Type | Description |
|---|---|---|
key |
Uint8Array | KeyLike |
Key representation to export as JWK. |
Returns
Example
const privateJwk = await jose.exportJWK(privateKey)
const publicJwk = await jose.exportJWK(publicKey)
console.log(privateJwk)
console.log(publicJwk)