Module

x/jose/index.ts>CompactEncrypt#encrypt

JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes.
Extremely Popular
Latest
method CompactEncrypt.prototype.encrypt
import { CompactEncrypt } from "https://dotland.deno.dev/x/jose@v5.9.6/index.ts";

Encrypts and resolves the value of the Compact JWE string.

Parameters

key: KeyLike | Uint8Array

Public Key or Secret to encrypt the JWE with. See Algorithm Key Requirements.

optional
options: EncryptOptions

JWE Encryption options.

Returns

Promise<string>