From f23312b0d344738858be4611d963df554d855a75 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 11 Nov 2020 13:17:05 +0100 Subject: [PATCH] fix decrypt/encrypt wording in error message --- src/platform/web/dom/Crypto.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/web/dom/Crypto.js b/src/platform/web/dom/Crypto.js index 35933310..2362ecda 100644 --- a/src/platform/web/dom/Crypto.js +++ b/src/platform/web/dom/Crypto.js @@ -217,7 +217,7 @@ class AESCrypto { ['encrypt'], ), "importKey"); } catch (err) { - throw new Error(`Could not import key for AES-CTR decryption: ${err.message}`); + throw new Error(`Could not import key for AES-CTR encryption: ${err.message}`); } try { const ciphertext = await subtleCryptoResult(this._subtleCrypto.encrypt( @@ -228,7 +228,7 @@ class AESCrypto { ), "encrypt"); return new Uint8Array(ciphertext); } catch (err) { - throw new Error(`Could not decrypt with AES-CTR: ${err.message}`); + throw new Error(`Could not encrypt with AES-CTR: ${err.message}`); } }