From 675e92ae3445958917a823a780d6e4058322fd47 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 5 Aug 2026 16:46:24 -0700 Subject: [PATCH] Revert regression. --- src/lib/crypto/wallet-aes-gcm.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/crypto/wallet-aes-gcm.ts b/src/lib/crypto/wallet-aes-gcm.ts index 3696de4..3250307 100644 --- a/src/lib/crypto/wallet-aes-gcm.ts +++ b/src/lib/crypto/wallet-aes-gcm.ts @@ -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 => { -- 2.52.0