ad3_auto

April 29, 2014

How To Get KeyHash, MD5 , SHA1, SHA256 of keystore

Here is the Steps,

WINDOWS

Step1 : We need to download openssl from Google code (64 bit users must download openssl-0.9.8e X64, not the latest version).

Step2 :  Extract it. and create a folder- "OpenSSL" in C:/ and copy the extracted code here.First open a terminal and go to JAVA\bin.

Step3 : Detect keystore file path and go to that directory in command promp (cmd).

Step4 : Type this command in 1 line.
keytool -exportcert -alias androiddebugkey -keystore "C:\path to keystore\keystore_name.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64

If it is not Working Use This,

keytool -list -v -keystore  C:\path to keystore\keystore_name.keystore

Step5 : Now, it will ask for password, Enter the password (Password of  default keystore will be  android for the default keystore ).


MAC

Step1 :  First open a terminal.

Step2 :  Navigate in the terminal to the directory where your Android debug.keystore is stored.

Step3 : Mostly the default keystore location in MAC will be in “/Users/user_name/.android/” .  Once you are in the keystore directory, run the following command.

Step4 :  keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64

If it is not Working Use This,

keytool -list -v -keystore  C:\path to keystore\keystore_name.keystore


 Here  debug.keystore is the keystore name. Replace this name with your keystore name.

Step5 : When it prompts you for a password then press Enter. (Password of  default keystore will be  android for the default keystore ).