代码贴出来
小程序向第三方服务器推送的信息有些解密成功,有些解密失败?服务器接收到小程序推送的消息 有些能解密成功,有些解密失败。报:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt 1. 解密成功消息:{"signature":"b4ac056f45ecb98ff368c50ca864c56811a5a312","timestamp":"1692755332","nonce":"1023818534","openid":"oFxIP5eR9AfTxhsNLf8gO16ITvzM","encrypt_type":"aes","msg_signature":"2b37eaf16f62fbc404fc57a162167fb5c384cd44","ToUserName":"gh_7bc9dd45d1c9","Encrypt":"AuWp6JVJhqGn0Wwb9kqBF0UsoffDxpUAEV1qra9mk0d\/KeizsfqTkmuVt28rHyZkk6xSJxKxdX9z0cU9aj\/B7tgpEwBDuzTKNBpzt+7r5BEQ2IM+gTD03\/af4L4SFc1k73CnBVFJZ3\/Xbd0WK6RosV0jQBO2TpvHsSgj8JPiCzgpuYJ67oW1emsqz\/X9W11oF07X3n7rHIj+MTQrS7hZkZZDaIFuoniCUecOXn5PnrYDO3rs5suX+urAbalmQ\/8GJnY+MjF6M7tOGowxwpj3qwsZvMsfbmqWfSfvN4Q\/ogU="} 2. 解密失败的消息:{"signature":"c21938343e746dc61a828f5a40c98a13bdf463f3","timestamp":"1692766857","nonce":"71319090","openid":"oFxIP5VggF1QsfCq_noA-ZXQygoA","encrypt_type":"aes","msg_signature":"d538fd01a52dc1524f5fba0dfd868088cc010580","ToUserName":"gh_7bc9dd45d1c9","Encrypt":"mln6B11p\/xFxBGtgSzpc2zoeYxyxzhMRwHXj1zRyEgJqaDsooP2bR3TUyGo0DteFryg\/f4DaWPAeSdevWPV860Znc7KkbBHEregXY+PQZO2cmiK2wmv9G5sFiT66N7Xdd4Qu8IXfgcLnWH\/x5x6rag0n6ChCzF0HxFj4NGsDaOuIscAxUHIyTHJx1Pput1Ai2MzueG87lqQAmChufF2SYSc9nmNq2bDlFcu62sbiutqeir+\/1mUERSFoqbpvPNvTskXJb3Pen9RXLG3MnsCKMxNSW6Bh+UFA2ZM0V+e4hpalHLLgvK5Lco28rkrYCPdFHJrDQ8wjXIHj14j2aSw9JfuTqkH4n9IOtuWUNm2BT9DaBCai5cOxSTsWJ35mZsveJgK2WIDQQjpHaZqybF7900naetOnGS0aV4D++VP0CeVQZ3DwAoDwG2KaEKLpjIPK5RnAQvEQI+V5YdUHJ\/eA6OIPAl+IMY03Sm4qZRl+uhIWJF9IUQuOs4OAPfO7RqXtp6Yga1Ffau3QcLu4DewhX76JO3pI2WHeix3LmBzkIRDCa8VQX\/2Ow2BPjUDd0G9kjB+QlYgGm+71V\/mF9fsZHuqfa+b5D6qQUITCqs9bjKcI7ceLhjnLqy92ruIZjF0IOE3VxIY3BvDctUuBlqY9TSAusy89HPHMcfviUB9Y8Lk="} 解密方法:openssl_decrypt($encrypted,'AES-256-CBC',$key,OPENSSL_RAW_DATA, $iv); 秘钥和$iv 都一样 这要怎么解决呀 ?
2023-08-23域名与加密url 需要保持一致的
调用jssdk返回无效签名想问一下大家调用jssdk的js安全域名是一定需要ICP备案的吗?
2023-08-23调用的时候,域名与加密url 是否一致?
根据js-sdk算法签名生成的签名完全一致,但是调用的时候显示无效{errMsg: "scanQRCode:ok", resultStr: "{"scan_code": {"scan_result":"scan resultStr is here"}}"} {errMsg: "config:fail,invalid signature", jsApiList: Array(0)} [图片] [图片]
2023-08-23