mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Merge branch 'master' into invalid-qr-patch
This commit is contained in:
@@ -17,7 +17,7 @@ export const makeNoiseHandler = ({ public: publicKey, private: privateKey }: Key
|
||||
|
||||
const authenticate = (data: Uint8Array) => {
|
||||
if(!isFinished) {
|
||||
hash = sha256(Buffer.from(Binary.build(hash, data).readByteArray()))
|
||||
hash = sha256(Buffer.concat([hash, data]))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export const makeNoiseHandler = ({ public: publicKey, private: privateKey }: Key
|
||||
isFinished = true
|
||||
}
|
||||
|
||||
const data = Binary.build(NOISE_MODE).readBuffer()
|
||||
const data = Buffer.from(NOISE_MODE)
|
||||
let hash = Buffer.from(data.byteLength === 32 ? data : sha256(Buffer.from(data)))
|
||||
let salt = hash
|
||||
let encKey = hash
|
||||
|
||||
Reference in New Issue
Block a user