Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/jose/jwe/flattened/decrypt.ts>flattenedDecrypt

JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes.
Extremely Popular
Go to Latest
function flattenedDecrypt
import { flattenedDecrypt } from "https://deno.land/x/jose@v5.5.0/jwe/flattened/decrypt.ts";

Decrypts a Flattened JWE.

Parameters

jwe: FlattenedJWE

Flattened JWE.

key: KeyLike | Uint8Array

Private Key or Secret to decrypt the JWE with. See Algorithm Key Requirements.

optional
options: DecryptOptions

JWE Decryption options.

Returns

Promise<FlattenedDecryptResult>

Type Parameters

optional
KeyLikeType extends KeyLike = KeyLike

Parameters

jwe: FlattenedJWE

Flattened JWE.

getKey: FlattenedDecryptGetKey

Function resolving Private Key or Secret to decrypt the JWE with. See Algorithm Key Requirements.

optional
options: DecryptOptions

JWE Decryption options.

Returns

Promise<FlattenedDecryptResult & ResolvedKey<KeyLikeType>>