Reputation: 45
I'm trying to create a hash key for my android app for facebook intergration
I've gone to the directory where the keytool is located at:
C:\Program Files\Java\jdk1.8.0_161\bin
I've used the following command to to try to generate the key:
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore |
C:\OpenSSL\bin\openssl sha1 -binary |
C:\OpenSSL\bin\openssl base64
However, I get the error after entering a password
openssl:Error: 'g√╓çtΩ┤N▀Kptε╫π∞' is an invalid command.
I've noted the command changes depending on the password. If I leave the password empty I get
openssl:Error: '\Fà»T' is an invalid command.
I'm using android 2.3.3
Any advice or help would be appreciated as I'm stumped and have found nothing online
Upvotes: 0
Views: 924
Reputation: 556
For anyone in the present day who might be running into this, make sure base64 is included at the end of the command. it is getting cut off when I paste the command into my terminal. So it should look like this:
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64
Upvotes: 2
Reputation: 21
I had this problem. The issue was because I was running the command in the wrong directory. Use the folder that has java/bin Initially I used C:\Program Files (x86)\Common Files\Oracle\Java\javapath After solving I used C:\Program Files\Java\jdk1.8.0_201\bin
Upvotes: 0
Reputation: 23
This previous question can be useful for your case:
RELEASE_KEY_ALIAS and RELEASE_KEY_PATH values for generating key hash
Upvotes: 0