Skip to content

Latest commit

 

History

History
73 lines (40 loc) · 2.22 KB

Recipient.md

File metadata and controls

73 lines (40 loc) · 2.22 KB

Interface: Recipient

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.

Used to build General JWE object's individual recipients.

Methods

addRecipient()

addRecipient(...args): Recipient

A shorthand for calling addRecipient() on the enclosing GeneralEncrypt instance

Parameters

Parameter Type
...args [Uint8Array | CryptoKey | JWK | KeyObject, CritOption]

Returns

Recipient


done()

done(): GeneralEncrypt

Returns the enclosing GeneralEncrypt instance

Returns

GeneralEncrypt


encrypt()

encrypt(...args): Promise<GeneralJWE>

A shorthand for calling encrypt() on the enclosing GeneralEncrypt instance

Parameters

Parameter Type
...args []

Returns

Promise<GeneralJWE>


setUnprotectedHeader()

setUnprotectedHeader(unprotectedHeader): Recipient

Sets the JWE Per-Recipient Unprotected Header on the Recipient object.

Parameters

Parameter Type Description
unprotectedHeader JWEHeaderParameters JWE Per-Recipient Unprotected Header.

Returns

Recipient