From: Ardis Lu Date: Tue, 21 Feb 2023 06:35:20 +0000 (-0800) Subject: Remove trailing commas X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=0899d82b0e0951f0768b6d9ec194191f4e91be22;p=static-encrypt Remove trailing commas --- diff --git a/decrypt.js b/decrypt.js index 9132f5c..ff85e32 100644 --- a/decrypt.js +++ b/decrypt.js @@ -14,7 +14,7 @@ export default async function decrypt(content, password) { encodedPassword, 'PBKDF2', false, - ['deriveKey'], + ['deriveKey'] ); const key = await crypto.subtle.deriveKey( @@ -22,7 +22,7 @@ export default async function decrypt(content, password) { name: 'PBKDF2', hash: 'SHA-512', salt, - iterations: 400_000, + iterations: 400_000 }, keyMaterial, { name: 'AES-GCM', length: 256 }, @@ -33,7 +33,7 @@ export default async function decrypt(content, password) { const encodedPlaintext = new Uint8Array(await crypto.subtle.decrypt( { name: 'AES-GCM', iv }, key, - ciphertext, + ciphertext )); const plaintext = new TextDecoder().decode(encodedPlaintext); diff --git a/index.html b/index.html index 8fe3874..5488eb1 100644 --- a/index.html +++ b/index.html @@ -95,7 +95,7 @@ encodedPassword, 'PBKDF2', false, - ['deriveKey'], + ['deriveKey'] ); const key = await crypto.subtle.deriveKey( @@ -103,7 +103,7 @@ name: 'PBKDF2', hash: 'SHA-512', salt, - iterations: 400_000, + iterations: 400_000 }, keyMaterial, { name: 'AES-GCM', length: 256 }, @@ -114,7 +114,7 @@ const ciphertext = new Uint8Array(await crypto.subtle.encrypt( { name: 'AES-GCM', iv }, key, - encodedPlaintext, + encodedPlaintext )); const contentBuffer = new Uint8Array(salt.byteLength + iv.byteLength + ciphertext.byteLength);