| 18 | |
| 19 | /** Used to build General JWE object's individual recipients. */ |
| 20 | export interface Recipient { |
| 21 | /** |
| 22 | * Sets the JWE Per-Recipient Unprotected Header on the Recipient object. |
| 23 | * |
| 24 | * @param unprotectedHeader JWE Per-Recipient Unprotected Header. |
| 25 | */ |
| 26 | setUnprotectedHeader(unprotectedHeader: types.JWEHeaderParameters): Recipient |
| 27 | |
| 28 | /** |
| 29 | * Sets the JWE Key Management parameters to be used when encrypting. |
| 30 | * |
| 31 | * (ECDH-ES) Use of this method is needed for ECDH based algorithms to set the "apu" (Agreement |
| 32 | * PartyUInfo) or "apv" (Agreement PartyVInfo) parameters. |
| 33 | * |
| 34 | * @param parameters JWE Key Management parameters. |
| 35 | */ |
| 36 | setKeyManagementParameters(parameters: types.JWEKeyManagementHeaderParameters): Recipient |
| 37 | |
| 38 | /** A shorthand for calling addRecipient() on the enclosing {@link GeneralEncrypt} instance */ |
| 39 | addRecipient(...args: Parameters<GeneralEncrypt['addRecipient']>): Recipient |
| 40 | |
| 41 | /** A shorthand for calling encrypt() on the enclosing {@link GeneralEncrypt} instance */ |
| 42 | encrypt(...args: Parameters<GeneralEncrypt['encrypt']>): Promise<types.GeneralJWE> |
| 43 | |
| 44 | /** Returns the enclosing {@link GeneralEncrypt} instance */ |
| 45 | done(): GeneralEncrypt |
| 46 | } |
| 47 | |
| 48 | class IndividualRecipient implements Recipient { |
| 49 | #parent: GeneralEncrypt |
no outgoing calls
no test coverage detected
searching dependent graphs…