I know How to generate SHA1 and Key Hash in Ubuntu 12.04, but don't know How to generate in Windows 8
To generate SHA1 in Linux Ubuntu 12.04, using following command in terminal:
Debug
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Release
keytool -list -v -keystore <keystore_path> -alias <alias_name>
To generate Key Hash in Linux Ubuntu 12.04, using following command in terminal:
Debug
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
Release
keytool -exportcert -alias <alias_name> -keystore <keystore_path> | openssl sha1 -binary | openssl base64
Note: I have followed this link to generate SHA1 Certificate fingerprint for Debug and Release modes
Its quite similar
FOR SHA1:
Open command prompt, type the following
cd C:\Program Files\Java\jdk1.8.0_45\bin
keytool -list -v -keystore C:\PathToKeyStore -alias -storepass password -keypass password
FOR KEYHASH:
download https://code.google.com/p/openssl-for-windows/downloads/detail?name=openssl-0.9.8e_X64.zip&can=2&q=
Extra to C:/
Go cmd and type cd C:\Program Files\Java\jdk1.8.0_45\bin
keytool -exportcert -alias -keystore "C:\PathToKeyStore" | "C:\openssl-0.9.8e_X64\bin\openssl" sha1 -binary |"C:\openssl-0.9.8e_X64\bin\openssl" base64
Related
The Facebook error message is :
Invalid key hash. The key hash xxxxxxx= does not match any stored key hashes...
I know this issue has been already treated but i still have the problem. I wrote below the detailled process but i should have miss something. Please help.
I am working on windows 10/Cordova/android.
Open cmd window as adminstrator
npm update -g cordova
cordova platform update android
cd platforms\android\build\outputs\apk; rm *.apk
keytool -genkey -v -keystore myapp.keystore -alias myappalias-keyalg RSA -keysize 2048 -validity 10000
cordova build android –release
Create platforms\android\release-signing.properties file including:
storeType=jks
keyAlias=myappalias
keyPassword=mypass
storePassword=mypass
remove the app from the android-smartphone
cordova run android –release
The key hash i cut& paste in the facebook field is given by the command:
keytool -exportcert -list -v -alias myappalias -keystore myapp.keystore | openssl sha1 -binary | openssl base64
It includes the sign =
Any Idea ?
Try this:
keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64
You can also use this.
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
I have a strange problem with one of my keystores. Depending on the directory I am in, the hash from keytool is different. The other strange thing is that it doesn't ask for a password even though it has one. For example:
$ keytool -exportcert -alias myalias -keystore ~/Desktop/Keys/mykey.keystore | openssl sha1 -binary | openssl base64
QXK1vA...
$ cd ~/Desktop/Keys/
$ keytool -exportcert -alias myalias -keystore mykey.keystore | openssl sha1 -binary | openssl base64
NqYlhGE...
Is it hosed?
If you need the SHA1 of your key, just type in
$ keytool -exportcert -v -list -keystore mykey.keystore
By placing | openssl sha1 -binary | openssl base64 after that, you are encoding the output displayed by the keytool command. I suppose this is not what you normally want.
when i try to get MD5 hash by using
C:\Program Files\Java\jre7\bin>keytool -list -alias androiddebugkey -keystore "C:\Users\learnwhat.android\debug.keystore" -storepass android -keypass android
only get SHA1 hash i need MD5 hash to in goole Map api key sing up. how i can get MD5 hash in jdk1.7.0_09?.
Add -v with command if you are using jre7 for getting MD5 hash for Google Map. this command return you both MD5 and SHA1 :
C:\<YOUR_JDK_PATH\bin>keytool -v androiddebugkey -keystore "C:Users\YOUR_NAME\.android
\debug.keystore" -alias alias_name -storepass android -keypass android
using the following command:
keytool -v -list -alias androiddebugkey -keystore debug.keystore
-v will force keytool generate md5, sha1, sha256
well i am stuck on this step too
$ keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 Enter keystore password: android
please any body explain it
after i tried on cmd i get it and it do as follow
first locate keytool in your system by cd \path\
after that write this line as it is
$ keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
and this one mean ~/.android/debug.keystore
the path where your keystore exported from eclips
and to make sure that the hashkey generated is really right the cmd should ask you about the password you use to generate keystore
I am trying to use openssl to export the key for my app. I followed the facebook developers guide but I am stuck when it comes to the keytool command.
Facebook has it this way:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
I have mine this way:
"C:\Program Files\Java\jdk1.6.0_23\bin\keytool" -exportcert -alias androiddebugkey -keystore "C:\Users\blah\.android\debug.keystore" | "C:\blah\bin\openssl" sha1 -binary |"C:\blah\bin\openssl" base64
I run openssl.exe as an administrator. When I run the above command, it says "Openssl Error: "C:\program files\java\jdk1.6.0_23\bin\keytool"" is an invalid command.
Please help! Thanks
I got it to work on Windows 7 by doing the following:
Copy the entire bin directory from the openssl install to the jdk.x.x\bin directory where the keytool is.
Run the command as shown in the facebook doc as follows:
keytool -exportcert -alias androiddebugkey -keystore C:\Users\MYUSER\.android\debug.keystore | openssl sha1 -binary | openssl base64
It asks for a password (only once) which is android
Hope this works for you