類似web服務修複方案。
小程式漏洞的修複方法有兩個,一個是還是加簽驗簽,另外一個是使用強加密方式加密資料。推薦第一個方法,小程式端也可以進行加簽/驗簽操作。這種方法與web程式防止資料包篡改的方式類似,原理大緻是使用sha256對接口資料進行摘要計算,再使用rsa或者rsa+aes的方式傳輸計算結果;傳輸過來後對收到的接口資料進行摘要計算,再比對兩次計算結果是否相同。
參考連結:
https://blog.csdn.net/th1996/article/details/106092709?utm_source=app&app_version=4.18.0
https://developers.weixin.qq.com/community/develop/article/doc/000aca16c544f89485297d7aa58413#%E8%AF%B7%E6%B1%82%E6%95%B0%E6%8D%AE%E9%98%B2%E7%AF%A1%E6%94%B9
https://segmentfault.com/a/1190000018857019
https://developers.weixin.qq.com/community/develop/doc/000802d910410850884ccb9dd5bc00?jumpto=comment&commentid=000a84fc500408f78f4cf4507514
https://www.jianshu.com/p/09e55dc776a9