mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
refactor: Change Sync Functions to Promises to Prevent Blocking Event Loop (#896)
* initial commit * lint * lint 2
This commit is contained in:
@@ -548,7 +548,7 @@ export const makeSocket = (config: SocketConfig) => {
|
||||
async function generatePairingKey() {
|
||||
const salt = randomBytes(32)
|
||||
const randomIv = randomBytes(16)
|
||||
const key = derivePairingCodeKey(authState.creds.pairingCode!, salt)
|
||||
const key = await derivePairingCodeKey(authState.creds.pairingCode!, salt)
|
||||
const ciphered = aesEncryptCTR(authState.creds.pairingEphemeralKeyPair.public, key, randomIv)
|
||||
return Buffer.concat([salt, randomIv, ciphered])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user