Skip to content

@mega-yfue/eufy-sdk / finishKeyExchange

Function: finishKeyExchange() ​

ts
function finishKeyExchange(prep, serverPublicKeyB64): SessionEntry;

Finish the exchange: decrypt the server's AES-CBC-wrapped public key with the localKey, ECDH-derive, and take the first 32 hex chars as the shareKey.

Parameters ​

prep ​

KeyExchangePrep

serverPublicKeyB64 ​

string

Returns ​

SessionEntry

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.