消息解密

在验签通过后,再进行业务消息解密。

为了保证 HTTP 传输报文对各种平台的兼容性,推送平台会对 businessData 中的字段进行 Base64 编码,应用在收到后,需要先进行 Base64 解码

localStr = Base64Decode(businessData)

接下来使用该 encryptionKey 作为解密的 Key,采用 PKCS#7 填充,CBC 模式,ivencryptionKey 的 前16位,对报文进行解密后,得到具体的业务数据。

localPlainBusinessData = AESDecrypt(Base64Decode(businessData),encryptionKey)

results matching ""

    No results matching ""