@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