Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/jose/jwt/encrypt.ts>EncryptJWT#setProtectedHeader

"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 EncryptJWT.prototype.setProtectedHeader
import { EncryptJWT } from "https://deno.land/x/jose@v4.9.3/jwt/encrypt.ts";

Sets the JWE Protected Header on the EncryptJWT object.

Parameters

JWE Protected Header. Must contain an "alg" (JWE Algorithm) and "enc" (JWE Encryption Algorithm) properties.