Skip to main content
Latest
class jose.GeneralEncrypt
import { jose } from "https://deno.land/x/jwe_cookie_map@v1.0.1/src/deps.ts";
const { GeneralEncrypt } = jose;

The GeneralEncrypt class is used to build and encrypt General JWE objects.

Constructors

new
GeneralEncrypt(plaintext: Uint8Array)

Properties

private
_aad: Uint8Array
private
_plaintext: Uint8Array
private
_protectedHeader: JWEHeaderParameters
private
_recipients: IndividualRecipient[]
private
_unprotectedHeader: JWEHeaderParameters

Methods

addRecipient(key: KeyLike | Uint8Array, options?: CritOption): Recipient

Adds an additional recipient for the General JWE object.

encrypt(options?: DeflateOption): Promise<GeneralJWE>

Encrypts and resolves the value of the General JWE object.

Sets the Additional Authenticated Data on the GeneralEncrypt object.

setProtectedHeader(protectedHeader: JWEHeaderParameters): this

Sets the JWE Protected Header on the GeneralEncrypt object.

setSharedUnprotectedHeader(sharedUnprotectedHeader: JWEHeaderParameters): this

Sets the JWE Shared Unprotected Header on the GeneralEncrypt object.