Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SHA-1 fingerprint of keystore certificate

Is the method for getting an SHA-1 fingerprint the same as the method of getting the fingerprint? Previously, I was running this command:

Windows Command Prompt running keytool.exe

It's not clear to me if the result I'm getting is the SHA-1 fingerprint. Can somebody clarify this?

like image 366
user2208349 Avatar asked Mar 31 '13 08:03

user2208349


People also ask

How do I get a SHA-1 certificate fingerprint?

Open a terminal and run the keytool utility provided with Java to get the SHA-1 fingerprint of the certificate. You should get both the release and debug certificate fingerprints. Note: When using Play App Signing, the upload key certificate will be different than the app signing key certificate.

What is SHA-1 certificate fingerprint?

SHA-1 is most often used to verify that a file has been unaltered. This is done by producing a hash value(hash value is produced by running an algorithm, called a cryptographic hash function), before the file has been transmitted, and then again once it reaches its destination.

How do I get SHA-1 and SHA256 key?

Generate a keystore fileOpen your application project in Android Studio. In the menu bar, choose Build > Generate Signed APK. Select APK and follow the instructions to create a keystore file. For more information, see the Generate an upload key and keystore section of Sign your App.


2 Answers

Follow this tutorial for creating SHA1 fingerprint for Google Map v2

For Debug mode:

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android  

for Release mode:

keytool -list -v -keystore {keystore_name} -alias {alias_name} 

example:

keytool -list -v -keystore C:\Users\MG\Desktop\test.jks -alias test 

On windows, when keytool command is not found, Go to your installed JDK Directory e.g. <YourJDKPath>\Java\jdk1.8.0_231\bin\, open command line and try the above commands for debug/release mode.

Another way of getting your SHA1 OR SHA-256 use ./gradlew signingReport

For more detailed info visit Using Gradle's Signing Report

like image 78
Amol Sawant 96 Kuli Avatar answered Oct 13 '22 07:10

Amol Sawant 96 Kuli


If you are using android studio use simple step

  1. Run your project
  2. Click on Gradle menu
  3. Expand Gradle Tasks tree
  4. Double click on android -> signingReport and see the magic
  5. It will tell you everything on the Run tab

enter image description here

Result Under Run Tab If Android Studio < 2.2
enter image description here

From android studio 2.2
Result will be available under Run console but use highlighted toggle button

enter image description here

Or
Second Way is
Create new project in android studio New -> Google Maps Activity

enter image description here

then open google_maps_api.xml xml file as shown in pics you will see your SHA key

enter image description here

like image 40
Lokesh Tiwari Avatar answered Oct 13 '22 08:10

Lokesh Tiwari