mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
fix decrypt/encrypt wording in error message
This commit is contained in:
parent
8b16d8bc99
commit
f23312b0d3
@ -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}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user