Skip to content

@mega-yfue/eufy-sdk / encryptBody

Function: encryptBody()

ts
function encryptBody(plaintext, shareKeyHex): string;

Encrypt a body: base64( IV(16) || AES-128-CBC-PKCS7(plaintext) ).

Parameters

plaintext

string | Buffer<ArrayBufferLike>

shareKeyHex

string

Returns

string

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.