How to Generate Release Key Hash for android

Android Highbrid

The Android Keystore system lets you store cryptographic keys in a container to make it more difficult to extract from the device. Once keys are in the keystore, they can be used for cryptographic operations with the key material remaining non-exportable.

In this short article, I will show you how simple it is to generate android debug/release keys for your app.

You can create a keystore with the Java Keytool utility that comes with any standard JDK distribution and can be located at %JAVA_HOME%\bin. On Windows this would usually be C:\Program Files\Java\jre7\bin. If you don’t have java installed download it from here.

Step 1

OpenSSL program for windows is also required, so download OpenSSL from Google (Download the version that is appropriate for your machine)

Step 2

Create a folder named OpenSSL in your C:\ and extract all the content of the downloaded file from google. 

Step 3

Get the path to your debug.keystore. By default it is located in c:\users\{username}\.android\debug.keystore. You can do a search in C:\ directory if you can’t find yours in that location. 

Step 3

Open a command window in administrator’s model and switch to that directory and enter a command like this:

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Keytool prompts you to provide passwords, provide the unique name fields and then the password for your key. It then generates the keystore as a file called my-release-key.keystore in the directory you’re in. It are protected by the passwords you entered. Itcontains a single key, valid for 10000 days. The alias_name is a name that you — will use later, to refer to this keystore when signing your application.

That’s it!