android哈希键 [英] android hash key

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

问题描述

我已经完成了开发一个使用Facebook sdk与Facebook集成的Android应用程序。我没有任何问题或问题来解决这个应用程序,因为它的功能和运行良好 - 但是说,我相信即使该应用程序正在运行,我仍然不完全明白什么是android键哈希。


1)我了解facebook sdk为开发人员提供了一个独特的应用程序,以了解他们的说话,他们也可以控制谁是谁等等,但是什么他们获得了你的Android键哈希吗? 2)我明白我的开发PC上的模拟器有一个键哈希(我得到了),以及三星Galaxy S1和S2(两者都有相同的键哈希)有一个不同的,现在我已经将apk传递给另一个具有不同密钥哈希(和不同的手机品牌和Android版本)的用户。那么 - 如果我有一天在Google Play上发布我的应用程序,是否需要更新所有可能的哈希键的Facebook /开发人员? 3)散列键是模型或平台/ android版本的唯一和常数,或者我可以从我的应用程序生成密钥哈希,所以我可以添加那个并且使来自不同手机的所有相同的应用程序使用相同的应用程序?



4)一般来说 - 我不明白什么是密钥哈希,谁生成它,最重要的是为什么 - 关键哈希的用途是什么,对Facebook有什么好处?



我试图搜索它,但在这里我发现了关于知道模拟器密钥哈希的步骤或如何处理方向的问题Google上的Facebook /开发人员。我确定有文档涵盖这一点,找不到。



谢谢!

解决方案


1 )我了解facebook sdk为开发人员提供了一个独特的应用程序ID,以便知道他们的说话,以便他们也可以控制谁是谁等等,但是他们获得了你的Android键哈希?


这是为了验证应用程序的身份,需要额外的一层安全性,您可以在文档。 2)我明白我的开发PC上的模拟器有一个键哈希(我得到了),而三星Galaxy S1和S2 (它们都具有相同的键哈希)有一个不同的,现在我已经将apk传递给另一个具有不同的键哈希(和不同的手机品牌和Android版本)的用户。那么 - 如果我有一天在Google Play上发布我的应用程序,是否需要更新所有可能的哈希键的Facebook /开发人员?


密钥哈希是基于您用于构建APK的计算机,它不依赖于运行的手机。所以,如果你只从一个开发机器上处理你的应用程序,那么你只需要为你的应用程序担心的一个键哈希值。目前,当您还在开发应用程序时,您正在使用 android debug 键,当您要发布到Google Play时,Google要求您使用自己的密钥登录APK,而不强制 android调试键。当您创建自己的密钥签署APK时,您还需要在Facebook上的应用设置中复制并粘贴您自己的密钥的密钥。


3)散列键是一个模型还是一个平台/ android版本的唯一和常数,或者我可以从我的应用程序生成一个密钥哈希,所以我可以添加,并使所有相同的应用程序,从不同的手机使用相同的一个?


如上所述,密钥哈希与其运行的平台/设备无关,一键与您建立您的APK的机器相关联。所以为了测试的目的,你会发现android调试键的关键哈希值并将其粘贴到应用程序设置中,运行该APK构建的所有手机将会起作用。简而言之,hash key =>开发PC, NOT 哈希键==>手机


4)再次一般 - 我不明白什么是关键哈希,谁生成它,最重要的是为什么 - 关键哈希的用途是什么,对Facebook有什么好处?
我试图搜索它,但在这里我发现了关于知道什么是模拟器密钥哈希的步骤或关于如何处理Facebook /开发人员在Google上的问题的问题。我确定有文档涵盖这一点,找不到。谢谢!


密钥散列是当您编译应用程序时用于签署APK的密钥的哈希值。 Eclipse自动为您安装了android调试键,但是当您上传到Google Play时,您需要创建自己的密钥。这对你和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天全站免登陆