简体   繁体   中英

What is a SHA1 fingerprint?

I am obtaining a Google Play API key from Google, and it is asking to enter SHA1 fingerprint. I want to know what is SHA1 fingerprint? I also wanted to know whether this API key can be used from another computer?

It is a standard for the implementation of a 'secure hash algorithm' - a one-way cryptographic function that can be used to act as a 'signature' of a sequence of bytes. It is very unlikely that 2 different byte sequences would produce the same value (though not impossible)

http://en.wikipedia.org/wiki/SHA-1

Note that there are other, more robust standards out there these days eg SHA256 and beyond.

They are asking for the SHA1 fingerprint on your keystore file (You sign your apps using this before you can push them to google play)

you can get your key by doing this

keytool -exportcert -alias your-key-name -keystore /path/to/your/keystore/file -list -v

you can use your keystore file from another computer just put it on a USB stick or email it to yourself (Make sure to keep it private !IMPORTANT!) and point your IDE to the file

If you are using Eclipse IDE, the easiest way to get the SHA1 fingerprint for your app:

  • click on your app project, in project explorer (on the left)
  • from the top menu, click Window -> Preferences
  • in the Preferences window, on the left, expand Android and click on Build

You should see the following information:

  • default debug keystore path
  • MD5 fingerprint
  • SHA1 fingerprint

You can also add other keystore file (for example, production keystore), and the values for that keystore will be shown also.

SHA - standing for Secure Hash Algorithm.

SHA-1 is one of several cryptographic hash functions. 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. The transmitted file can be considered genuine only if both checksums are identical.

A file hashed with SHA1 could look like:

752c14ea195c369bac3c3b7896975ee9fd15eeb7

For detailed explanation you can refer to: https://www.lifewire.com/what-is-sha-1-2626011

The easiest way to get SHA 1 certficate fingerprint is to click on Gradle in the upper hand right side near the corner of the screen of Android Studio. Then click on the name of the app(eg android123(root): it should appear like this). After that, you will find a subfolder named android and clicking on it go for the signingReport.It should run in the console and should show you the SHA 1 certficate fingerprint. Hope it helps.

From a Windows command prompt, navigate to the root of the project. The gradlew file will be there.

type this at the prompt and (enter): gradlew signingReport

in the report look for something like: SHA1: A7:89:E5:05:C8:17:A1:22:EA:90:6E:A6:EA:A3:D4:8B:3A:30:AB:18

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM