Skip to content

Commit bc3e284

Browse files
eliranleviwbamberg
authored andcommitted
Remove unused variable declarations in encrypt-decrypt example (mdn#46)
* Remove unused variable declarations in encrypt-decrypt example Removing these unused variables might improve readability and reduce confusion :) * Update decryptMessage comments in encrypt-decrypt examples
1 parent 7ace5a1 commit bc3e284

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

web-crypto/encrypt-decrypt/aes-cbc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@
4444
}
4545

4646
/*
47-
Fetch the encoded message and decrypt it.
47+
Fetch the ciphertext and decrypt it.
4848
Write the decrypted message into the "Decrypted" box.
4949
*/
5050
async function decryptMessage(key) {
51-
let encoded = getMessageEncoding();
5251
let decrypted = await window.crypto.subtle.decrypt(
5352
{
5453
name: "AES-CBC",

web-crypto/encrypt-decrypt/aes-ctr.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,10 @@
4545
}
4646

4747
/*
48-
Fetch the encoded message and decrypt it.
48+
Fetch the ciphertext and decrypt it.
4949
Write the decrypted message into the "Decrypted" box.
5050
*/
5151
async function decryptMessage(key) {
52-
let encoded = getMessageEncoding();
5352
let decrypted = await window.crypto.subtle.decrypt(
5453
{
5554
name: "AES-CTR",

web-crypto/encrypt-decrypt/aes-gcm.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@
4444
}
4545

4646
/*
47-
Fetch the encoded message and decrypt it.
47+
Fetch the ciphertext and decrypt it.
4848
Write the decrypted message into the "Decrypted" box.
4949
*/
5050
async function decryptMessage(key) {
51-
let encoded = getMessageEncoding();
5251
let decrypted = await window.crypto.subtle.decrypt(
5352
{
5453
name: "AES-GCM",

web-crypto/encrypt-decrypt/rsa-oaep.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@
4040
}
4141

4242
/*
43-
Fetch the encoded message and decrypt it.
43+
Fetch the ciphertext and decrypt it.
4444
Write the decrypted message into the "Decrypted" box.
4545
*/
4646
async function decryptMessage(key) {
47-
let encoded = getMessageEncoding();
4847
let decrypted = await window.crypto.subtle.decrypt(
4948
{
5049
name: "RSA-OAEP"

0 commit comments

Comments
 (0)