【问题标题】:What is "signature" in Google Play in app billing algorithm什么是应用计费算法中 Google Play 中的“签名”
【发布时间】:2015-04-19 06:09:03
【问题描述】:

Google play 使用 RSA 算法进行加密/解密。在google play返回的数据中,有一个名为“signature”的字段。

Bundle containing the following key-value pairs
"RESPONSE_CODE" with int value, RESULT_OK(0) if success, other response codes on failure as listed above.
"INAPP_PURCHASE_ITEM_LIST" - StringArrayList containing the list of SKUs
"INAPP_PURCHASE_DATA_LIST" - StringArrayList containing the purchase information
"INAPP_DATA_SIGNATURE_LIST"- StringArrayList containing the signatures of the purchase information
"INAPP_CONTINUATION_TOKEN" - String containing a continuation token for the next set of in-app purchases. Only set if the user has more owned skus than the current list.

我想知道 IInAppBillingService 方法(getSkuDetails、getBuyIntent 和 getPurchases)中使用的“签名”和“签名列表”是什么。

【问题讨论】:

    标签: android in-app-purchase rsa google-play-services


    【解决方案1】:

    来自 Android 开发者网站中的参考资料:

    INAPP_DATA_SIGNATURE - 包含购买签名的字符串 开发者用他们的私钥签名的数据。数据 签名使用 RSASSA-PKCS1-v1_5 方案。

    购买签名是通过使用与您的开发者帐户关联的私钥对INAPP_PURCHASE_DATA 签名而创建的字符串。您可以使用签名来验证购买数据没有被任何方式篡改,并且用户确实购买了您的应用。

    由于签名过程是使用私钥完成的,因此应在远程服务器上进行验证,而不是在设备本身上进行,因此如果您希望使用此安全功能,则需要实现自己的验证服务器。

    【讨论】:

      猜你喜欢
      • 2012-08-13
      • 2017-10-19
      • 2013-11-15
      • 2018-02-05
      • 1970-01-01
      • 2022-06-17
      • 2022-07-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多