{"id":179487,"date":"2013-05-13T13:42:06","date_gmt":"2013-05-13T09:42:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=179487"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=179487","title":{"rendered":"<span class=\"post_title\">\u0417\u0430\u0449\u0438\u0442\u0430 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043e\u0442 \u0432\u0437\u043b\u043e\u043c\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0442 \u0432\u0437\u043b\u043e\u043c\u0430, \u043d\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0442 Google \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e? \u041f\u0440\u043e\u0441\u0438\u043c \u043f\u043e\u0434 \u043a\u0430\u0442!<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u0412 \u0447\u0451\u043c \u0441\u043b\u0430\u0431\u043e\u0441\u0442\u044c Google Application Licensing?<\/h4>\n<p>  \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0445\u043e\u0440\u043e\u0448\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438 \u0435\u0433\u043e \u0432\u0437\u043b\u043e\u043c \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430. \u0412\u0441\u0451 \u0447\u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u2014 \u0441\u043a\u0430\u0447\u0430\u0442\u044c apktool, \u043d\u0430\u0439\u0442\u0438 \u043a\u043b\u0430\u0441\u0441 LicenseChecker \u0438 \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 checkAccess. <\/p>\n<h4>\u041a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0449\u0438\u0442\u0443?<\/h4>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043b\u044e\u0431\u0443\u044e \u0437\u0430\u0449\u0438\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u043e\u043c\u0430\u0442\u044c. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0435\u0431\u0440\u044f\u043d\u043d\u043e\u0439 \u043f\u0443\u043b\u0435\u0439, \u043d\u043e \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0436\u0438\u0437\u043d\u044c. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 PackageInfo:<\/p>\n<pre><code class=\"java\">PackageInfo info =getPackageManager().getPackageInfo(getPackageName(), 0); Signature[] signatures = info.signatures; <\/code><\/pre>\n<p>  \u041d\u0443\u043b\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043b\u044e\u0447\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u044b\u043b\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0441\u0430\u043c \u043a\u043b\u044e\u0447, \u043e\u043d \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u043a\u043e\u0440\u043e.<br \/>  \u041b\u043e\u0433\u0438\u0447\u043d\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432 Java \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u0438\u0451\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c apktool \u043f\u043e\u0445\u043e\u0440\u043e\u043d\u0438\u0442 \u0432\u0430\u0448\u0443 \u0437\u0430\u0449\u0438\u0442\u0443 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0442\u043e\u0438\u0442 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043d\u0430 \u043d\u0435\u0439\u0442\u0438\u0432 \u0443\u0440\u043e\u0432\u0435\u043d\u044c. <\/p>\n<pre><code class=\"cpp\">const char* rsa = &quot;PUT_YOUR_RSA_KEY_HERE&quot;; jint verifyCertificate(JNIEnv *env, jobject obj, jobject cnt) { \tjclass cls = env-&gt;GetObjectClass(cnt); \tjmethodID mid = env-&gt;GetMethodID(cls, &quot;getPackageManager&quot;, \t\t\t&quot;()Landroid\/content\/pm\/PackageManager;&quot;); \tjmethodID pnid = env-&gt;GetMethodID(cls, &quot;getPackageName&quot;, \t\t\t&quot;()Ljava\/lang\/String;&quot;); \tif (mid == 0 || pnid == 0) { \t\treturn ERROR; \t}  \tjobject pacMan_o = env-&gt;CallObjectMethod(cnt, mid); \tjclass pacMan = env-&gt;GetObjectClass(pacMan_o); \tjstring packName = (jstring) env-&gt;CallObjectMethod(cnt, pnid);  \t\/*flags = PackageManager.GET_SIGNATURES*\/ \tint flags = 0x40; \tmid = env-&gt;GetMethodID(pacMan, &quot;getPackageInfo&quot;, \t\t\t&quot;(Ljava\/lang\/String;I)Landroid\/content\/pm\/PackageInfo;&quot;); \tif (mid == 0) { \t\treturn ERROR; \t} \tjobject pack_inf_o = (jobject) env-&gt;CallObjectMethod(pacMan_o, mid, \t\t\tpackName, flags);  \tjclass packinf = env-&gt;GetObjectClass(pack_inf_o); \tjfieldID fid; \tfid = env-&gt;GetFieldID(packinf, &quot;signatures&quot;, \t\t\t&quot;[Landroid\/content\/pm\/Signature;&quot;); \tjobjectArray signatures = (jobjectArray) env-&gt;GetObjectField(pack_inf_o, \t\t\tfid); \tjobject signature0 = env-&gt;GetObjectArrayElement(signatures, 0); \tmid = env-&gt;GetMethodID(env-&gt;GetObjectClass(signature0), &quot;toByteArray&quot;, \t\t\t&quot;()[B&quot;); \tjbyteArray cert = (jbyteArray) env-&gt;CallObjectMethod(signature0, mid); \tif (cert == 0) { \t\treturn ERROR; \t} \tjclass BAIS = env-&gt;FindClass(&quot;java\/io\/ByteArrayInputStream&quot;); \tif (BAIS == 0) { \t\treturn ERROR; \t} \tmid = env-&gt;GetMethodID(BAIS, &quot;&lt;init&gt;&quot;, &quot;([B)V&quot;); \tif (mid == 0) { \t\treturn ERROR; \t} \tjobject input = env-&gt;NewObject(BAIS, mid, cert);  \tjclass CF = env-&gt;FindClass(&quot;java\/security\/cert\/CertificateFactory&quot;); \tmid = env-&gt;GetStaticMethodID(CF, &quot;getInstance&quot;, \t\t\t&quot;(Ljava\/lang\/String;)Ljava\/security\/cert\/CertificateFactory;&quot;);  \tjstring X509 = env-&gt;NewStringUTF(&quot;X509&quot;); \tjobject cf = env-&gt;CallStaticObjectMethod(CF, mid, X509); \tif (cf == 0) { \t\treturn ERROR; \t} \t\/\/&quot;java\/security\/cert\/X509Certificate&quot; \tmid = env-&gt;GetMethodID(CF, &quot;generateCertificate&quot;, \t\t\t&quot;(Ljava\/io\/InputStream;)Ljava\/security\/cert\/Certificate;&quot;); \tif (mid == 0) { \t\treturn ERROR; \t} \tjobject c = env-&gt;CallObjectMethod(cf, mid, input); \tif (c == 0) { \t\treturn ERROR; \t} \tjclass X509Cert = env-&gt;FindClass(&quot;java\/security\/cert\/X509Certificate&quot;); \tmid = env-&gt;GetMethodID(X509Cert, &quot;getPublicKey&quot;, \t\t\t&quot;()Ljava\/security\/PublicKey;&quot;); \tjobject pk = env-&gt;CallObjectMethod(c, mid); \tif (pk == 0) { \t\treturn ERROR; \t} \tmid = env-&gt;GetMethodID(env-&gt;GetObjectClass(pk), &quot;toString&quot;, \t\t\t&quot;()Ljava\/lang\/String;&quot;); \tif (mid == 0) { \t\treturn ERROR; \t} \tjstring all = (jstring) env-&gt;CallObjectMethod(pk, mid); \tconst char * all_char = env-&gt;GetStringUTFChars(all, NULL); \tchar * out = NULL; \tif (all_char != NULL) { \t\tchar * startString = strstr(all_char, &quot;modulus:&quot;); \t\tchar * end = strstr(all_char, &quot;public exponent&quot;); \t\tbool isJB = false; \t\tif (startString == NULL) { \t\t\t\/\/4.1.x \t\t\tstartString = strstr(all_char, &quot;modulus=&quot;); \t\t\tend = strstr(all_char, &quot;,publicExponent&quot;); \t\t\tisJB = true; \t\t} \t\tif (startString != NULL && end != NULL) { \t\t\tint len; \t\t\tif (isJB) { \t\t\t\tstartString += strlen(&quot;modulus=&quot;); \t\t\t\tlen = end - startString; \t\t\t} else { \t\t\t\tstartString += strlen(&quot;modulus:&quot;); \t\t\t\tlen = end - startString - 5; \/* -5 for new lines*\/ \t\t\t} \t\t\tout = new char[len + 2]; \t\t\tstrncpy(out, startString, len); \t\t\tout[len] = '\\0'; \t\t} \t}  \tenv-&gt;ReleaseStringUTFChars(all, all_char); \tchar * is_found = strstr(out, rsa); \t \t\/\/ \u043f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \tif (IS_DEBUG) { \t\treturn is_found != NULL ? 0 : 1; \t} else { \t\treturn is_found != NULL ? 1 :0; \t} } <\/code><\/pre>\n<h4>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435?<\/h4>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0447\u0430\u0441\u0442\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0432 \u0442\u0443 \u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043d\u0430 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c. \u0418 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0431\u0438\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0435\u0440\u0430. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u043d\u0435 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u0430\u044f. \u041d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u044f\u0432\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c, \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0435\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0438\u0433\u0440\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u043b\u044b \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u043a\u0430\u043c \u0438\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0433\u0440\u043e\u043a\u0430 \u0431\u043e\u043b\u0435\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u044b\u043c. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u044f, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0432 10% \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0422\u0443\u0442 \u0432\u0441\u0451 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u0432\u0430\u0441.<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0438\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"java\">public class YourClass { \tstatic { \t\tSystem.loadLibrary(&quot;name_of_library&quot;); \t} public native int getSomeValue(); public native void init(Context ctx); } <\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434 init \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437. <\/p>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435\u0439\u0442\u0438\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">jint isCertCorrect = 0; JNIEXPORT void JNICALL Java_com_your_package_YourClass_init(JNIEnv *env, jobject obj, jobject ctx) { \tisCertCorrect = verifyCertificate(env, obj, ctx); }  JNIEXPORT jint JNICALL Java_com_your_package_YourClass_getSomeValue(JNIEnv *env, jobject obj) { if (isCertCorrect ) { \/\/ \u0432\u0441\u0451 \u043f\u043e \u043f\u043b\u0430\u043d\u0443 } else { \/\/ \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u044e \u0442\u0443\u0442 } <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0437\u0430\u0449\u0438\u0442\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0437\u043b\u043e\u043c\u0430\u043d \u043f\u0443\u0442\u0451\u043c \u0434\u0438\u0437\u0430\u0441\u0435\u043c\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u043d\u0430\u043d\u0438\u0439 \u0438 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 Java. \u041f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u043b \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0421 \u043a\u043e\u0434\u0430, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0437\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. <\/p>\n<h4>\u0417\u0430\u0449\u0438\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 RSA \u043a\u043b\u044e\u0447\u0438;<\/li>\n<li>\u041a\u043b\u0438\u0435\u043d\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447;<\/li>\n<li>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432\u0438\u0434\u0430 String getInfo(String publicKey); \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443, \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 RSA \u043a\u043b\u044e\u0447;  <\/li>\n<li>\u041a\u043b\u0438\u0435\u043d\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0435\u0433\u043e \u043d\u0430 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c; <\/li>\n<li>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u0435\u0442 \u043d\u0430 \u0432\u0441\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/li>\n<\/ol>\n<p>  \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f\u043c \u0425\u0430\u0431\u0440\u0430 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u043e\u043a \u0441\u043e \u0441\u0432\u043e\u0438\u0445 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/179487\/\"> http:\/\/habrahabr.ru\/post\/179487\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0442 \u0432\u0437\u043b\u043e\u043c\u0430, \u043d\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0442 Google \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043a\u043e\u0434\u0430. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e? \u041f\u0440\u043e\u0441\u0438\u043c \u043f\u043e\u0434 \u043a\u0430\u0442!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-179487","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/179487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=179487"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/179487\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=179487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=179487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=179487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}