Skip to content

@mega-yfue/eufy-sdk / tuya / swapMd5

Function: swapMd5()

ts
function swapMd5(postData): string;

The postData sign transform: md5 the body to 32 hex chars, then rotate the four 8-char blocks [b0 b1 b2 b3][b1 b0 b3 b2]. This is the Thingclips SDK 7.5.0 transform; it is applied to the postData value before it is joined into the preimage.

✅ Confirmed: the thing.m.user.uid.token.create call carries a postData, and its sign (computed over this transform) was accepted by a1.tuyaeu.com with no SIGN_INVALID — so a postData-bearing preimage IS exercised end-to-end. (The static smartlife.p.time.get golden vector separately carries no postData; the two together cover both paths.)

Parameters

postData

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.