Back to Jose

Interface: CompactDecryptGetKey()

docs/jwe/compact/decrypt/interfaces/CompactDecryptGetKey.md

6.2.22.3 KB
Original Source

Interface: CompactDecryptGetKey()

šŸ’— 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.

Interface for Compact JWE Decryption dynamic key resolution. No token components have been verified at the time of this function call.

ā–ø CompactDecryptGetKey(protectedHeader, token): Uint8Array | CryptoKey | JWK | KeyObject | Promise<Uint8Array | CryptoKey | JWK | KeyObject>

Dynamic key resolution function. No token components have been verified at the time of this function call.

If a suitable key for the token cannot be matched, throw an error instead.

Parameters

ParameterTypeDescription
protectedHeaderCompactJWEHeaderParametersJWE or JWS Protected Header.
tokenFlattenedJWEThe consumed JWE or JWS token.

Returns

Uint8Array | CryptoKey | JWK | KeyObject | Promise<Uint8Array | CryptoKey | JWK | KeyObject>