How to get SHA-1 and SHA-256 from Android Studio
SHA-1 and SHA-256 are used in Firebase OAuth and Dynamic links
SHA-1(Secure Hash Algorithm-1) is a cryptographic term or cryptographic hash function which takes an input and produces a 160-bit (20 bytes) hash value known as a message digest. It is typically rendered as a hexadecimal number which is 40 digits long.
Android Studio has two forms of SHA
- SHA-1 fingerprint certificate
- SHA-256 fingerprint certificate
- SHA-1 is used to create an OAuth2 client and API key for your app
- SHA-256 is used for configuring Firebase Dynamic links
How to get SHA-1 and SHA-256 from Android Studio
Follow these steps to get both SHA-1 and SHA-256:
- Open any Android Studio Project (recommended version is Android Studio 3.6+)
- On the right side of your project, you’ll see Device Explorer, Flutter Inspector(If installed), and Gradle.
3. Click Gradle and expand the <project name> tab. It looks like below-
4. After step 3 follow the below events
<project name> → android → signing Report
5. After clicking the signing report, a terminal panel will open which shows your SHA-1, SHA-256, and MD5.
6. Copy SHA-1 and SHA-256 and use them wherever it is necessary.
Note
- SHA-1 and SHA-256 have validity. Make sure to change it wherever you need it before it expires.
- It will also be saved in the Android Project directory with .keystore extension. This will be used while uploading your app to Google PlayStore.
If you like what you just read, Please clap, share, and comment below so that others might stumble upon this blog. For more blogs like this, please scroll down and Follow Gnanendra Prasad P or click here.