mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: resolve DataView constructor error in lt-hash (#1279)
This commit is contained in:
committed by
GitHub
parent
7466a8facb
commit
af17232611
@@ -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')
|
||||
export const LT_HASH_ANTI_TAMPERING = new d('WhatsApp Patch Integrity')
|
||||
|
||||
Reference in New Issue
Block a user