]> git.codecow.com Git - libnemo.git/commitdiff
Include statements in try-catch.
authorChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 20:29:12 +0000 (13:29 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 3 Jul 2025 20:29:12 +0000 (13:29 -0700)
src/lib/workers/safe.ts

index 1cc4918f3123b624420e288913d070ad89df9a12..af4346d2c9fc6b7a2beefad6aede34d0a99980c7 100644 (file)
@@ -168,10 +168,10 @@ export class Safe extends WorkerInterface {
                if (record == null) {
                        return null
                }
-               const encrypted = hex.toBytes(record.encrypted)
-               const iv = await Entropy.import(record.iv)
 
                try {
+                       const encrypted = hex.toBytes(record.encrypted)
+                       const iv = await Entropy.import(record.iv)
                        const derivationAlgorithm: Pbkdf2Params = {
                                name: 'PBKDF2',
                                hash: 'SHA-512',