From: Chris Duncan Date: Wed, 5 Aug 2026 23:46:24 +0000 (-0700) Subject: Revert regression. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=675e92ae3445958917a823a780d6e4058322fd47;p=libnemo.git Revert regression. --- 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 => {