<font class="popmake-631">Subscribe</font>Subscribe with Androidlift to get new post on mail.

Android studio Generate SHA-1 Certificate Key Hash

SHA-1 Certificate Key Hash Generation with Android studio .

SHA-1 Certificate Key Hash is required in some integrations like Google+, Facebook etc…with your Android application.To authenticate the exchange of information between your app and the Facebook,Google+ you need to generate a key hash.Without this, your Facebook integration may not work properly when you release your app to the store.
There are two ways to generate SHA-1 Certificate Key Hash. Those are as follows :
  1. With Android Studio Terminal
  2. With Piece Of Coding

With Android Studio Terminal

  • The Terminal prompts you to enter a password for the keystore. The default password for the debug keystore is android. The keytool then prints the fingerprint to the terminal. For example see below image:

Output for above commands is :

 SHA-1 Certificate Key Hash
SHA-1 Certificate Key Hash

That sit we have obtain the SHA-1 Certificate Key Hash by using Android Studio Terminal.

With Piece Of Coding

You can copy this method code to Java class and call it. It will log in the logcat the Key Hash . This is easy, and it’s a relief than using SSL and so.

Output of above code is :

You can delete the code after knowing the key.

this is the key in logcat.

 SHA-1 Certificate Key Hash
Key Hash

That sit we have obtain the Key Hash by using above two methods, So use it whenever you need it.


Best Luck…!