]> git.codecow.com Git - libnemo.git/commitdiff
Type passkeys.
authorChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 16:53:33 +0000 (09:53 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 16:53:33 +0000 (09:53 -0700)
src/lib/workers/safe.ts

index ecfb58b82d2259c73d885a0dc280ff4c036f168a..837a403cb7004fbc31ec2f2d3f6d4ce24c5340f0 100644 (file)
@@ -94,7 +94,7 @@ export class Safe extends WorkerInterface {
        * Encrypts data with a password as bytes and stores it in the Safe.
        */
        static async overwrite (name: string, password: Uint8Array, data: any): Promise<boolean> {
-               let passkey
+               let passkey: CryptoKey
                try {
                        passkey = await subtle.importKey('raw', password, 'PBKDF2', false, ['deriveBits', 'deriveKey'])
                } catch {
@@ -140,7 +140,7 @@ export class Safe extends WorkerInterface {
        * Retrieves data from the Safe and decrypts data with a password as bytes.
        */
        static async get (name: string, password: Uint8Array): Promise<any> {
-               let passkey
+               let passkey: CryptoKey
                try {
                        passkey = await subtle.importKey('raw', password, 'PBKDF2', false, ['deriveBits', 'deriveKey'])
                } catch {