docs/jwe/flattened/decrypt/interfaces/FlattenedDecryptGetKey.md
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.
Resolves a key for Flattened JWE decryption from unverified headers and token data.
| Type Parameter | Default type | Description |
|---|---|---|
KeyType extends CryptoKey | Uint8Array | CryptoKey | Uint8Array | Type definition of the keys the function resolves. Narrowing it is what lets ResolvedKey.key be inferred at the call site. |
āø FlattenedDecryptGetKey(protectedHeader, token): JWK | KeyObject | KeyType | Promise<JWK | KeyObject | KeyType>
Resolves a key for an unverified token. Throw if no suitable key can be resolved.
| Parameter | Type | Description |
|---|---|---|
protectedHeader | JWEHeaderParameters | undefined | JWE or JWS Protected Header. |
token | FlattenedJWE | The consumed JWE or JWS token; none of its components have been verified. |
JWK | KeyObject | KeyType | Promise<JWK | KeyObject | KeyType>