]> git.codecow.com Git - libnemo.git/commitdiff
Revert regression.
authorChris Duncan <chris@codecow.com>
Wed, 5 Aug 2026 23:46:24 +0000 (16:46 -0700)
committerChris Duncan <chris@codecow.com>
Wed, 5 Aug 2026 23:46:24 +0000 (16:46 -0700)
src/lib/crypto/wallet-aes-gcm.ts

index 3696de433570be3d8e9497fa85660d00a14a50b2..32503071aa9a7ab607916a4d75c5325fac79da55 100644 (file)
@@ -35,9 +35,7 @@ export class WalletAesGcm {
                // restrict iv to 96 bits per GCM best practice
                const iv = crypto.getRandomValues(new Uint8Array(12)).buffer
                const additionalData = utf8.toBuffer(`${type};${id}`)
-               const s = new Uint8Array(seed)
-               const m = new Uint8Array(mnemonic ?? [])
-               const encoded = new Uint8Array([...s, ...m])
+               const encoded = new Uint8Array([...new Uint8Array(seed), ...new Uint8Array(mnemonic ?? [])])
                return crypto.subtle
                        .encrypt({ name: 'AES-GCM', iv, additionalData }, key, encoded)
                        .then(encrypted => {