docs/jwe/general/encrypt/interfaces/Recipient.md
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.
āø addRecipient(...args): Recipient
A shorthand for calling addRecipient() on the enclosing GeneralEncrypt instance
| Parameter | Type |
|---|---|
...args | [Uint8Array | CryptoKey | JWK | KeyObject, CritOption] |
Recipient
āø done(): GeneralEncrypt
Returns the enclosing GeneralEncrypt instance
āø encrypt(...args): Promise<GeneralJWE>
A shorthand for calling encrypt() on the enclosing GeneralEncrypt instance
| Parameter | Type |
|---|---|
...args | [] |
āø setKeyManagementParameters(parameters): Recipient
Sets the JWE Key Management parameters to be used when encrypting.
(ECDH-ES) Use of this method is needed for ECDH based algorithms to set the "apu" (Agreement PartyUInfo) or "apv" (Agreement PartyVInfo) parameters.
| Parameter | Type | Description |
|---|---|---|
parameters | JWEKeyManagementHeaderParameters | JWE Key Management parameters. |
Recipient
āø setUnprotectedHeader(unprotectedHeader): Recipient
Sets the JWE Per-Recipient Unprotected Header on the Recipient object.
| Parameter | Type | Description |
|---|---|---|
unprotectedHeader | JWEHeaderParameters | JWE Per-Recipient Unprotected Header. |
Recipient