fix decrypt/encrypt wording in error message
This commit is contained in:
parent
8b16d8bc99
commit
f23312b0d3
1 changed files with 2 additions and 2 deletions
|
@ -217,7 +217,7 @@ class AESCrypto {
|
||||||
['encrypt'],
|
['encrypt'],
|
||||||
), "importKey");
|
), "importKey");
|
||||||
} catch (err) {
|
} 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 {
|
try {
|
||||||
const ciphertext = await subtleCryptoResult(this._subtleCrypto.encrypt(
|
const ciphertext = await subtleCryptoResult(this._subtleCrypto.encrypt(
|
||||||
|
@ -228,7 +228,7 @@ class AESCrypto {
|
||||||
), "encrypt");
|
), "encrypt");
|
||||||
return new Uint8Array(ciphertext);
|
return new Uint8Array(ciphertext);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new Error(`Could not decrypt with AES-CTR: ${err.message}`);
|
throw new Error(`Could not encrypt with AES-CTR: ${err.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue