Skip to content

decryptCompactJwe ​

decryptCompactJwe ​

Decrypts with explicit application allowlists, bounded parsing and the supplied private key. RSA unwrap, wrong CEK length, wrong key and GCM authentication failures share decryption_failed. A wrong RSA ciphertext length skips RSA and follows the dummy-CEK/GCM path. This reduces oracle information; JavaScript and provider implementations are not promised to be constant-time.

ts
function decryptCompactJwe(
	token: string,
	options: DecryptJweOptions,
): Promise<JoseResult<DecryptedJwe, JweErrorCode>>

Parameters

Released under the MIT License.