Skip to content

Commit af17232

Browse files
authored
fix: resolve DataView constructor error in lt-hash (#1279)
1 parent 7466a8f commit af17232

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Utils/lt-hash.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ class d {
3838
async _addSingle(e, t) {
3939
var r = this
4040
const n = new Uint8Array(await hkdf(Buffer.from(t), o, { info: r.salt })).buffer
41-
return r.performPointwiseWithOverflow(e, n, ((e, t) => e + t))
41+
return r.performPointwiseWithOverflow(await e, n, ((e, t) => e + t))
4242
}
4343
async _subtractSingle(e, t) {
4444
var r = this
4545

4646
const n = new Uint8Array(await hkdf(Buffer.from(t), o, { info: r.salt })).buffer
47-
return r.performPointwiseWithOverflow(e, n, ((e, t) => e - t))
47+
return r.performPointwiseWithOverflow(await e, n, ((e, t) => e - t))
4848
}
4949
performPointwiseWithOverflow(e, t, r) {
5050
const n = new DataView(e)
@@ -58,4 +58,4 @@ class d {
5858
return a
5959
}
6060
}
61-
export const LT_HASH_ANTI_TAMPERING = new d('WhatsApp Patch Integrity')
61+
export const LT_HASH_ANTI_TAMPERING = new d('WhatsApp Patch Integrity')

0 commit comments

Comments
 (0)