From af17232611702b98274a52d0ff88f828c56afa5a Mon Sep 17 00:00:00 2001 From: M Ilham Ari Pahmi <98020400+4relial@users.noreply.github.com> Date: Sun, 2 Mar 2025 17:08:43 +0700 Subject: [PATCH] fix: resolve DataView constructor error in lt-hash (#1279) --- src/Utils/lt-hash.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Utils/lt-hash.ts b/src/Utils/lt-hash.ts index 1842a31..e3cc666 100644 --- a/src/Utils/lt-hash.ts +++ b/src/Utils/lt-hash.ts @@ -38,13 +38,13 @@ class d { async _addSingle(e, t) { var r = this const n = new Uint8Array(await hkdf(Buffer.from(t), o, { info: r.salt })).buffer - return r.performPointwiseWithOverflow(e, n, ((e, t) => e + t)) + return r.performPointwiseWithOverflow(await e, n, ((e, t) => e + t)) } async _subtractSingle(e, t) { var r = this const n = new Uint8Array(await hkdf(Buffer.from(t), o, { info: r.salt })).buffer - return r.performPointwiseWithOverflow(e, n, ((e, t) => e - t)) + return r.performPointwiseWithOverflow(await e, n, ((e, t) => e - t)) } performPointwiseWithOverflow(e, t, r) { const n = new DataView(e) @@ -58,4 +58,4 @@ class d { return a } } -export const LT_HASH_ANTI_TAMPERING = new d('WhatsApp Patch Integrity') \ No newline at end of file +export const LT_HASH_ANTI_TAMPERING = new d('WhatsApp Patch Integrity')