Android的哈希键 [英] android hash key

查看:153
本文介绍了Android的哈希键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了开发一个Android应用程序,使用Facebook的SDK来与Facebook整合。我没有任何问题,或者需要解决的问题,在这一点上的应用程序,因为它是功能齐全,运行很好 - 但随着中说,我相信,即使该应用程序正在运行,我还没有完全理解什么是Android的密钥散列。

1)据我所知,Facebook的SDK供开发了一个独特的应用程序ID就知道给谁的会说话有那么他们也会对谁是谁,这样的控制,但他们怎么得到了有你的android密钥散列的?
2)据我所知,我的模拟器开发PC上有一个关键的哈希值(这我得到),两者三星Galaxy S1和S2(两者具有相同的密钥散列)有一个不同的,现在我已经通过将APK到具有不同的密钥哈希值(和不同的手机品牌和Android版本)其他用户。所以 - 如果我发表我对谷歌的应用程序玩了一天,我是否会需要更新所有可能的哈希键的Facebook /开发人员?
3)是哈希键独一无二的常数模型或平台/ Android版本,或者我可以生成从我的应用程序的关键哈希这样我就可以增加这一点,使所有相同的应用程序,这与不同的手机上运行使用同一个?
4)再次一般 - 我不明白什么的密钥散列,谁产生了,而且最重要的原因 - 有什么用的密钥散列,以及有什么好处呢对于Facebook?
我试图寻找它,但在这里,我发现了大约知道的步骤只是问题什么在做什么与谷歌的Facebook /开发商模拟器密钥散列或指示。我敢肯定有涵盖本文档,找不到它。谢谢!

解决方案
  

1)据我所知,Facebook的SDK供开发了一个独特的应用程序ID就知道给谁的会说话有那么他们也会对谁控制谁等,但他们怎么得到了有你的Andr​​oid关键的哈希?

这对于一个额外的安全层来验证应用程序的标识,你可以在见文档

  

2)据我所知,我的模拟器开发PC上有一个关键的哈希值(这我得到),两者三星Galaxy S1和S2(两者具有相同的密钥散列)有一个不同的,而现在我已经通过APK到具有不同的密钥哈希值(和不同的手机品牌和Android版本)其他用户。所以 - 如果我发表我对谷歌的应用程序玩了一天,我是否会需要更新所有可能的哈希键的Facebook /开发人员?

键哈希是基于使用来构建APK在计算机上,它不依赖于什么手机它运行。所以,如果你只能在从一个开发机器上你的应用程序则只有一个键,你不用担心你的应用程序的哈希值。目前,使用的是机器人调试键,当你仍然在开发的应用程序,当你想要发布到谷歌播放,谷歌需要你签署APK用自己的密钥,和 Android的调试关键。当你创建自己的密钥来签署您的APK,你也需要复制和粘贴自己的密钥的密钥散列在Facebook上。

应用程序设置
  

3)是哈希键独一无二的常数模型或平台/ Android版本,或者我可以生成从我的应用程序的关键哈希这样我就可以增加这一点,使所有相同的应用程序,这与不同的手机使用运行同一个?

就像我上面说的,关键的哈希不与平台/设备是运行在一个关键的哈希值与机器你建立你的APK关联。因此,对于测试的目的,你会发现Android的调试密钥的密钥哈希值,并将其粘贴在应用程序设置,并且运行的APK版本将工作的所有手机。总之,散列键=>开发PC,不会哈希键==>电话

  

4)再次一般 - 我不明白什么的密钥散列,谁产生了,而且最重要的原因 - 有什么用的密钥散列,以及有什么好处呢对于Facebook?   我试图寻找它,但在这里,我发现了大约知道的步骤只是问题什么在做什么与谷歌的Facebook /开发商模拟器密钥散列或指示。我敢肯定有涵盖本文档,找不到它。谢谢!

键哈希是用来签署APK,当您编译应用程序中的关键的哈希值。自动日食了Android调试来完成这个给你,但是当你上传到谷歌播放,你需要创建自己的密钥。这是很好的为您和Facebook的,因为它是一个额外的安全层,以确保应用程序调用代表你的API是您的应用程序。

I have accomplished developing an android app that uses the facebook sdk to integrate with Facebook. I have no issue or problem to solve at this point with the app as it is functional and runs nicely - but with that said I believe that even though the app is running, I still don't fully understand what's the android key hash.

1) I understand the facebook sdk supplies the developer with a unique app id to know to whom their "talking" with so they'll also have control on who's who and such, but what do they gain out of having your android key hash?
2) I understand that my emulator on the development PC has a key hash (which i got), and both Samsung Galaxy S1 and S2 (which both have the same key hash) have a different one, and now I've passed the apk to another user which has a different key hash (and a different phone brand and android version). So - if I publish my app on Google Play one day, will i be needing to update facebook/developers of all the possible hash keys?
3) Is the hash key unique and constant to a model or a platform/android version, or can i generate a key hash from my app so i can add just that and make all the same app that's running from different phones use the same one?
4)again in general - i don't understand whats the key hash, who generates it, and most importantly why - what's the use of the key hash, and what good is it for facebook?
I've tried to search for it, but in here i've found just questions about the steps of knowing whats the emulator key hash or directions on what to do with Facebook/developers on Google. I'm sure there's documentation that covers this, couldn't find it. Thanks!

解决方案

1) I understand the facebook sdk supplies the developer with a unique app id to know to whom their "talking" with so they'll also have control on who's who and such, but what do they gain out of having your android key hash?

It's for an additional layer of security to verify the identity of the application as you can see in the documentation.

2) I understand that my emulator on the development PC has a key hash (which i got), and both Samsung Galaxy S1 and S2 (which both have the same key hash) have a different one, and now I've passed the apk to another user which has a different key hash (and a different phone brand and android version). So - if I publish my app on Google Play one day, will i be needing to update facebook/developers of all the possible hash keys?

Key hash is based on the computer you use to build the APK, it is not dependent on what phone it is run on. So, if you only work on your app from one development machine then there is only one key hash you have to worry about for your app. Currently, you are using an android debug key when you are still developing your app, when you want to publish to Google Play, Google requires you to sign the APK with your own key, and not the android debug key. When you create your own key to sign your APK, you need to also copy and paste the key hash of your own key in the app settings on Facebook.

3) Is the hash key unique and constant to a model or a platform/android version, or can i generate a key hash from my app so i can add just that and make all the same app that's running from different phones use the same one?

Like I said above, key hash is not associated with which platform/device it is run on, a key hash is associated with which machine you build your APK on. So for testing purposes, you find the key hash of the android debug key and paste it in the app settings, and all phones that run that APK build will work. In short, hash key => development PC, NOT hash key ==> phone

4)again in general - i don't understand whats the key hash, who generates it, and most importantly why - what's the use of the key hash, and what good is it for facebook? I've tried to search for it, but in here i've found just questions about the steps of knowing whats the emulator key hash or directions on what to do with Facebook/developers on Google. I'm sure there's documentation that covers this, couldn't find it. Thanks!

Key hash is a hash of the key that is used to sign an APK when you compile your app. Eclipse automatically does this for you with the android debug key, but when you upload to Google Play you need to create your own key. It's good for you and for Facebook because it is an additional layer of security to make sure that the app calling the API on your behalf is actually your app.

这篇关于Android的哈希键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆