Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 1 KB

File metadata and controls

18 lines (11 loc) · 1 KB

poul / com.sophoun.utils.billing / GooglePlayBillingSecurity / verifyPurchase

verifyPurchase

fun verifyPurchase(base64PublicKey: String?, signedData: String, signature: String?): Boolean

Verifies that the data was signed with the given signature, and returns the verified purchase. The data is in JSON format and signed with a private key. The data also contains the PurchaseState and product ID of the purchase.

Parameters

base64PublicKey - The base64-encoded public key to use for verifying.

signedData - The signed JSON string (signed, not encrypted)

signature - The signature for the data, signed with the private key