有案例可以参考么
设备获取SecretNo返回无效的签名在服务商平台添加了设备,还勾选了使用同一初始secretno选项,根据获取SecretNo协议说明发送了请求,但总是返回无效的签名,关于sha1(sort(sn、seedSecretNo、timestamp、nonce, “secret_no”))这个说明还是不太确定,按字母排序,从小到大拼成字符串,意思试把这几个字符串先拼在一起再去按每个字符的大小从小到大排序,还是直接拼接起来就行了,我两种都试了还是不行,比如: sn:202012091140 seedSecretNo:2799d9716183eff89fb88b2e31bdb794 timestamp:1607495021 nonce:740882966 sort之后:2020120911402799d9716183eff89fb88b2e31bdb7941607495021740882966secret_no sha1之后:3827ebb742ad55d55fc81d425026d29be7bf6d57 {"cmd":"get_secret_no","headers":{"req_id":"1001"},"body":{"device_signature":"3827ebb742ad55d55fc81d425026d29be7bf6d57","nonce":740882966,"timestamp":1607495021,"sn":"202012091140"}} 返回:{"headers":{"req_id":"1001"},"errcode":600011,"errmsg":"invalid signature, hint: [1607495025_119_4fd3dea0ef8f92b54cae66c76ccd829b], reqid: [1001]"} 另外一种拼接后从大到小排序:00000011111112222233344444566777788889999999_bbbbcddeeeefffnorst,以这样大小排序后也不行,具体规则是怎样的,可以举例说明下吗?
2021-01-29