question: public static boolean verifyPurchase ( String productId , String base64PublicKey , String signedData , String signature ) { if ( TextUtils . isEmpty ( signedData ) || TextUtils . isEmpty ( base64PublicKey ) || TextUtils . isEmpty ( signature ) ) { if ( BuildConfig . DEBUG ) { if ( productId . equals ( "android.test.purchased" ) ) { return true ; } } Log . e ( TAG , "Purchase verification failed: missing data." ) ; return false ; } PublicKey key = Security . generatePublicKey ( base64PublicKey ) ; return Security . verify ( key , signedData , signature ) ; }
target:  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.