, 15 2020 . 14:25
+
: .
10
.
. C#.net , php, , , , sandbox, , .
https://www.b4x.com/android/forum/threads/i...fication.91128/
,
https://gist.github.com/menny/1985010#file-...rket_in_app-php
function verify_market_in_app($signed_data, $signature, $public_key_base64)
{
$key = "-----BEGIN PUBLIC KEY-----\n".
chunk_split($public_key_base64, 64,"\n").
'-----END PUBLIC KEY-----';
//using PHP to create an RSA key
$key = openssl_get_publickey($key);
//$signature should be in binary format, but it comes as BASE64.
//So, I'll convert it.
$signature = base64_decode($signature);
//using PHP's native support to verify the signature
$result = openssl_verify(
$signed_data,
$signature,
$key,
OPENSSL_ALGO_SHA1);
if (0 === $result)
{
return false;
}
else if (1 !== $result)
{
return false;
}
else
{
return true;
}
}
, , ssl, ? google, ,
http://redsungame.ru/inapp.php
?
2020_07_15_13_55_55.jpg (, : 25)
https://forum.sources.ru/index.php?showtopic=419161&view=findpost&p=3834268
:
Android
iOS