]> git.ardis.lu - static-encrypt/commitdiff
Remove trailing commas
authorArdis Lu <ardisglu@gmail.com>
Tue, 21 Feb 2023 06:35:20 +0000 (22:35 -0800)
committerArdis Lu <ardisglu@gmail.com>
Tue, 21 Feb 2023 06:35:20 +0000 (22:35 -0800)
decrypt.js
index.html

index 9132f5c3c270398bcf6c51277c84a1744a980956..ff85e32df6c8465ba3823fde6169d61ef6e0d3a1 100644 (file)
@@ -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);
index 8fe387488cb1a20a7b512f78cf77f9deee845f1e..5488eb12318385f87e482ac513f540159fbcbaf0 100644 (file)
@@ -95,7 +95,7 @@
         encodedPassword,
         'PBKDF2',
         false,
-        ['deriveKey'],
+        ['deriveKey']
       );
 
       const key = await crypto.subtle.deriveKey(
           name: 'PBKDF2',
           hash: 'SHA-512',
           salt,
-          iterations: 400_000,
+          iterations: 400_000
         },
         keyMaterial,
         { name: 'AES-GCM', length: 256 },
       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);
This page took 0.055429 seconds and 4 git commands to generate.