]> git.codecow.com Git - libnemo.git/commitdiff
Update var name to reflect intent.
authorChris Duncan <chris@zoso.dev>
Tue, 31 Mar 2026 10:28:48 +0000 (03:28 -0700)
committerChris Duncan <chris@zoso.dev>
Tue, 31 Mar 2026 10:28:48 +0000 (03:28 -0700)
src/lib/vault/passkey.ts

index 90a70b8774a6752d70aa68c8f7e6c1ba663317ad..254a3ce7420a81ff0ee7129cd94bb6464377480e 100644 (file)
@@ -17,7 +17,7 @@ export class Passkey {
 
                        // Only unlocking should decrypt the vault; other sensitive actions should
                        // throw if the vault is still locked and encrypted
-                       const purpose: KeyUsage[] = action === 'unlock' ? ['decrypt'] : ['encrypt']
+                       const keyUsages: KeyUsage[] = action === 'unlock' ? ['decrypt'] : ['encrypt']
 
                        return crypto.subtle
                                .importKey('raw', password, 'PBKDF2', false, ['deriveKey'])
@@ -34,7 +34,7 @@ export class Passkey {
                                                length: 256
                                        }
                                        return crypto.subtle
-                                               .deriveKey(derivationAlgorithm, derivationKey, derivedKeyType, false, purpose)
+                                               .deriveKey(derivationAlgorithm, derivationKey, derivedKeyType, false, keyUsages)
                                })
                                .catch(err => {
                                        console.error(err)