From 1f6ef554c23d18d75bad1417dcf957e5aa48e85c Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Sat, 25 Sep 2021 23:01:58 +0530 Subject: [PATCH] fix lthash not being included in lib --- src/WABinary/{LTHash.js => LTHash.ts} | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) rename src/WABinary/{LTHash.js => LTHash.ts} (86%) diff --git a/src/WABinary/LTHash.js b/src/WABinary/LTHash.ts similarity index 86% rename from src/WABinary/LTHash.js rename to src/WABinary/LTHash.ts index bc29567..b11053b 100644 --- a/src/WABinary/LTHash.js +++ b/src/WABinary/LTHash.ts @@ -1,9 +1,12 @@ -const { hkdf } = require("../Utils/generics"); +import { hkdf } from '../Utils' const o = 128; class d { - constructor(e) { + + salt: string + + constructor(e: string) { this.salt = e } add(e, t) { @@ -45,4 +48,4 @@ class d { return a } } -module.exports.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') \ No newline at end of file