Skip to content

@mega-yfue/eufy-sdk / decodeImageV1

Function: decodeImageV1()

ts
function decodeImageV1(data, p2pDid): Buffer<ArrayBufferLike> | null;

Decode a v1 eufysecurity: blob to a plain JPEG buffer using the station's p2p_did. Returns null if the blob isn't v1. Mirrors the legacy decode: parse SERIAL + CODE, derive the key, AES-128-ECB-decrypt the first 256 bytes, splice the decrypted head back in front of the plaintext tail.

Parameters

data

Buffer

p2pDid

string

Returns

Buffer<ArrayBufferLike> | null

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.