Forget trying to familiarize those keytool command options. An easier way is to call a method to output the keyhash of the keystore being used in the app.

This is a method from JavaTechIG. Pretty slick.

Make sure you have OpenSSL installed. If not, download and install it to your desktop according to either 32 or 64 version.

Once installed, make sure that it is part of the system path so you can execute OpenSSL anywhere.

To get the key hash of your Android app, go to where your keystore file is located and type the following.

keytool -list -alias [ALIAS_NAME] -keystore [KEYSTORE_FILE] | openssl sha1 -binary | openssl base64

That’s it!

Related Posts Plugin for WordPress, Blogger...