From 502dd9a3dbaf38a23e5a0f082a6b701cec0d40a1 Mon Sep 17 00:00:00 2001 From: Hadar Date: Wed, 11 Sep 2019 16:36:47 +0300 Subject: [PATCH] fix: missing taglength for msrcrypto --- sea.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sea.js b/sea.js index 2f765d5b..0bfb01a3 100644 --- a/sea.js +++ b/sea.js @@ -576,7 +576,7 @@ bufiv = shim.Buffer.from(json.iv, opt.encode || 'base64'); bufct = shim.Buffer.from(json.ct, opt.encode || 'base64'); var ct = await aeskey(key, buf, opt).then((aes) => (/*shim.ossl ||*/ shim.subtle).decrypt({ // Keeping aesKey scope as private as possible... - name: opt.name || 'AES-GCM', iv: new Uint8Array(bufiv) + name: opt.name || 'AES-GCM', iv: new Uint8Array(bufiv), tagLength: 128 }, aes, new Uint8Array(bufct))); }catch(e){ if('utf8' === opt.encode){ throw "Could not decrypt" }