• <bdo id='fVb4L'></bdo><ul id='fVb4L'></ul>

    <legend id='fVb4L'><style id='fVb4L'><dir id='fVb4L'><q id='fVb4L'></q></dir></style></legend>

    <small id='fVb4L'></small><noframes id='fVb4L'>

    <i id='fVb4L'><tr id='fVb4L'><dt id='fVb4L'><q id='fVb4L'><span id='fVb4L'><b id='fVb4L'><form id='fVb4L'><ins id='fVb4L'></ins><ul id='fVb4L'></ul><sub id='fVb4L'></sub></form><legend id='fVb4L'></legend><bdo id='fVb4L'><pre id='fVb4L'><center id='fVb4L'></center></pre></bdo></b><th id='fVb4L'></th></span></q></dt></tr></i><div id='fVb4L'><tfoot id='fVb4L'></tfoot><dl id='fVb4L'><fieldset id='fVb4L'></fieldset></dl></div>

    <tfoot id='fVb4L'></tfoot>

        Google Play 应用签名密钥哈希

        Google play app signing key hash(Google Play 应用签名密钥哈希)

        <i id='9bmno'><tr id='9bmno'><dt id='9bmno'><q id='9bmno'><span id='9bmno'><b id='9bmno'><form id='9bmno'><ins id='9bmno'></ins><ul id='9bmno'></ul><sub id='9bmno'></sub></form><legend id='9bmno'></legend><bdo id='9bmno'><pre id='9bmno'><center id='9bmno'></center></pre></bdo></b><th id='9bmno'></th></span></q></dt></tr></i><div id='9bmno'><tfoot id='9bmno'></tfoot><dl id='9bmno'><fieldset id='9bmno'></fieldset></dl></div>
          <bdo id='9bmno'></bdo><ul id='9bmno'></ul>
        • <tfoot id='9bmno'></tfoot>

              1. <legend id='9bmno'><style id='9bmno'><dir id='9bmno'><q id='9bmno'></q></dir></style></legend>
              2. <small id='9bmno'></small><noframes id='9bmno'>

                  <tbody id='9bmno'></tbody>

                • 本文介绍了Google Play 应用签名密钥哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我选择了 google play 应用签名,我了解 google 更改了应用的签名密钥,我找到了 Sha 1 证书但找不到 keyhash.

                  I have opted for google play app signing and i understand that google changes the signing keys for the app and I found the Sha 1 certificate but couldnt find the keyhash .

                  如何获取已发布应用的 keyhash 有没有办法从证书中提取它?

                  How can i get the keyhash of my released app is there a way to extract it from the certificate?

                  推荐答案

                  您可以从 Sha1 证书签名中提取 keyhash.密钥哈希通常通过以下方式提取:

                  You can extract keyhash from the Sha1 certificate signature. Key hashes are usually extracted in the following way:

                  public static String getKeyHash(final Context context) {
                      PackageInfo packageInfo = getPackageInfo(context, PackageManager.GET_SIGNATURES);
                      if (packageInfo == null)
                          return null;
                  
                      for (Signature signature : packageInfo.signatures) {
                          try {
                              MessageDigest md = MessageDigest.getInstance("SHA");
                              md.update(signature.toByteArray());
                              return Base64.encodeToString(md.digest(), Base64.NO_WRAP);
                          } catch (NoSuchAlgorithmException e) {
                              Log.w(TAG, "Unable to get MessageDigest. signature=" + signature, e);
                          }
                      }
                      return null;
                  }
                  

                  您可以看到 SHA-1 版本的签名是 Base64 编码的.

                  You can see that SHA-1 version of signature is Base64 encoded.

                  在 Google Play 开发者控制台的 App Signing 菜单下,您将看到如下所示的 Sha-1 证书签名:

                  Under App Signing menu in Google play developer console, you will see Sha-1 certificate signature that looks like this:

                  SHA1: 3B:DA:A0:5B:4F:35:71:02:4E:27:22:B9:AC:B2:77:2F:9D:A9:9B:D9
                  

                  基本上,您要做的就是将其更改为字节数组,然后 Base64 对该字节数组进行编码.您可以执行以下操作:

                  Basically, what you have to do is to change this into a byte array and Base64 encode that byte array. You can do something like:

                  byte[] sha1 = {
                      0x3B, (byte)0xDA, (byte)0xA0, 0x5B, 0x4F, 0x35, 0x71, 0x02, 0x4E, 0x27, 0x22, (byte)0xB9, (byte)0xAc, (byte)0xB2, 0x77, 0x2F, (byte)0x9D, (byte)0xA9, (byte)0x9B, (byte)0xD9
                  };
                  Log.e("keyhash", Base64.encodeToString(sha1, Base64.NO_WRAP));
                  

                  您可以将此 keyhash 注册到 facebook android 登录设置或任何您喜欢的地方.

                  You can register this keyhash to facebook android login settings or wherever you like.

                  这篇关于Google Play 应用签名密钥哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Android - Is it possible to get install referrer programmatically(Android - 是否有可能以编程方式安装引荐来源网址)
                  How to sign an APK with more than one certificate?(如何使用多个证书签署 APK?)
                  versionCode vs versionName in Android Manifest(Android Manifest 中的 versionCode 与 versionName)
                  What does this Google Play APK publish error message mean?(这个 Google Play APK 发布错误消息是什么意思?)
                  Lost my keystore for uploaded app on android market(丢失了我在 android 市场上上传的应用程序的密钥库)
                  App on Google Play always shows quot;Updatequot; instead of open(Google Play 上的应用程序总是显示“更新;而不是打开)
                  <i id='PPY5Y'><tr id='PPY5Y'><dt id='PPY5Y'><q id='PPY5Y'><span id='PPY5Y'><b id='PPY5Y'><form id='PPY5Y'><ins id='PPY5Y'></ins><ul id='PPY5Y'></ul><sub id='PPY5Y'></sub></form><legend id='PPY5Y'></legend><bdo id='PPY5Y'><pre id='PPY5Y'><center id='PPY5Y'></center></pre></bdo></b><th id='PPY5Y'></th></span></q></dt></tr></i><div id='PPY5Y'><tfoot id='PPY5Y'></tfoot><dl id='PPY5Y'><fieldset id='PPY5Y'></fieldset></dl></div>
                  1. <small id='PPY5Y'></small><noframes id='PPY5Y'>

                      <tbody id='PPY5Y'></tbody>
                    <tfoot id='PPY5Y'></tfoot>
                        <legend id='PPY5Y'><style id='PPY5Y'><dir id='PPY5Y'><q id='PPY5Y'></q></dir></style></legend>

                          <bdo id='PPY5Y'></bdo><ul id='PPY5Y'></ul>