Ionic/Cordova 如何生成哈希键? [英] How does Ionic/Cordova generate hash key?
问题描述
我正在努力添加与 ionic/Cordova 的 Facebook API 集成,并且正在尝试找到为我的应用程序生成的调试哈希键:
I'm working on adding Facebook API integration with ionic/Cordova and am trying to find the debug hash key that is generated for my app when I do:
ionic build android
我知道它会在/userhomedir/.android/debug.keystore 生成一个新的 .keystore 文件.但是它设置的别名和密码是什么?在 Cordova 为我的应用程序创建它之后,我如何检索它.在构建过程中,我没有看到任何地方打印哈希键.
I know that it generates a new .keystore file at /userhomedir/.android/debug.keystore. But what does it set as the alias and password? And how can I retrieve this hash key after Cordova has created it for my app. I don't see the hash key being printed anywhere during the build process.
我需要生成的哈希键提供给 Facebook API 以使用他们在 SDK 上的签名
I need the generated hash key to give to Facebook API to use their sign on SDK
推荐答案
Cordova 似乎使用 ~/android/debug.keystore
和密码 android
It seems Cordova use ~/android/debug.keystore
with the password android
得到它:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
使用密码:android
这篇关于Ionic/Cordova 如何生成哈希键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!