File tree Expand file tree Collapse file tree
jwe/general/decrypt/functions
jws/general/verify/functions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ Decrypts a General JWE.
1313This function is exported (as a named export) from the main ` 'jose' ` module entry point as well
1414as from its subpath export ` 'jose/jwe/general/decrypt' ` .
1515
16+ > [ !NOTE] \
17+ > The function iterates over the ` recipients ` array in the General JWE and returns the
18+ > decryption result of the first recipient entry that can be successfully decrypted. The result
19+ > only contains the plaintext and headers of that successfully decrypted recipient entry. Other
20+ > recipient entries in the General JWE are not validated, and their headers are not included in
21+ > the returned result. Recipients of a General JWE should only rely on the returned (decrypted)
22+ > data.
23+
1624### Parameters
1725
1826| Parameter | Type | Description |
Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ Verifies the signature and format of and afterwards decodes the General JWS.
1313This function is exported (as a named export) from the main ` 'jose' ` module entry point as well
1414as from its subpath export ` 'jose/jws/general/verify' ` .
1515
16+ > [ !NOTE] \
17+ > The function iterates over the ` signatures ` array in the General JWS and returns the
18+ > verification result of the first signature entry that can be successfully verified. The result
19+ > only contains the payload, protected header, and unprotected header of that successfully
20+ > verified signature entry. Other signature entries in the General JWS are not validated, and
21+ > their headers are not included in the returned result. Recipients of a General JWS should only
22+ > rely on the returned (verified) data.
23+
1624### Parameters
1725
1826| Parameter | Type | Description |
Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ export interface GeneralDecryptGetKey extends types.GetKeyFunction<
2424 * This function is exported (as a named export) from the main `'jose'` module entry point as well
2525 * as from its subpath export `'jose/jwe/general/decrypt'`.
2626 *
27+ * > [!NOTE]\
28+ * > The function iterates over the `recipients` array in the General JWE and returns the
29+ * > decryption result of the first recipient entry that can be successfully decrypted. The result
30+ * > only contains the plaintext and headers of that successfully decrypted recipient entry. Other
31+ * > recipient entries in the General JWE are not validated, and their headers are not included in
32+ * > the returned result. Recipients of a General JWE should only rely on the returned (decrypted)
33+ * > data.
34+ *
2735 * @example
2836 *
2937 * ```js
Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ export interface GeneralVerifyGetKey extends types.GenericGetKeyFunction<
2727 * This function is exported (as a named export) from the main `'jose'` module entry point as well
2828 * as from its subpath export `'jose/jws/general/verify'`.
2929 *
30+ * > [!NOTE]\
31+ * > The function iterates over the `signatures` array in the General JWS and returns the
32+ * > verification result of the first signature entry that can be successfully verified. The result
33+ * > only contains the payload, protected header, and unprotected header of that successfully
34+ * > verified signature entry. Other signature entries in the General JWS are not validated, and
35+ * > their headers are not included in the returned result. Recipients of a General JWS should only
36+ * > rely on the returned (verified) data.
37+ *
3038 * @example
3139 *
3240 * ```js
You can’t perform that action at this time.
0 commit comments