diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-02-16 16:27:14 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 16:27:14 +0530 |
commit | 77a9683425357f106614fc04dcac5654cd4aeece (patch) | |
tree | 818c8869528ea6d4753d52b5661f0ec3f2e4ed61 /ext/crypto/00_crypto.js | |
parent | 074f53234a161b3ef02d3d28e3ff16053fa69a5a (diff) |
fix(ext/crypto): optional additionalData in encrypt/decrypt (#13669)
Diffstat (limited to 'ext/crypto/00_crypto.js')
-rw-r--r-- | ext/crypto/00_crypto.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index 0bde30c5f..8203a5307 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -691,7 +691,8 @@ algorithm: "AES-GCM", length: key[_algorithm].length, iv: normalizedAlgorithm.iv, - additionalData: normalizedAlgorithm.additionalData, + additionalData: normalizedAlgorithm.additionalData || + null, tagLength: normalizedAlgorithm.tagLength, }, data); @@ -3825,7 +3826,7 @@ algorithm: "AES-GCM", length: key[_algorithm].length, iv: normalizedAlgorithm.iv, - additionalData: normalizedAlgorithm.additionalData, + additionalData: normalizedAlgorithm.additionalData || null, tagLength: normalizedAlgorithm.tagLength, }, data); |