Skip to main content
Module

x/jose/index.ts>CompactEncrypt#encrypt

"JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto in Node.js, Browser, Cloudflare Workers, Electron, and Deno.
Extremely Popular
Go to Latest
method CompactEncrypt.prototype.encrypt
import { CompactEncrypt } from "https://deno.land/x/jose@v4.8.3/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.

optional
options: EncryptOptions

JWE Encryption options.

Returns

Promise<string>