SHA1 fingerprint is a unique hash or can be called as the signature of your application. In the old days, we use to verify application from client-side like providing specific keys. This way of verifying the application was vulnerable. By using SHA1 fingerprint we can verify our application from the server rather than adding secrete keys inside the application. Nowadays almost all the services are using SHA1 fingerprint to verify applications. Some of them are google maps API, Firebase, Google Plus sign in, etc. In this tutorial, I will explain the types of SHA1 fingerprint and how we can create SHA1 fingerprint in detail.
Types SHA1 fingerprint
There are two different types of SHA1 fingerprint while creating android applications. First one is debug SHA1 fingerprint and other one is release SHA1 fingerprint. In debug SHA1 fingerprint it is used while developing application. Before uploading app to playstore we have to create release SHA1 fingerprint. Now let’s create this one by one
How to create debug SHA1 fingerprint
STEP 1 : Create or open existing android studio project.
STEP 2 : Go to View -> Tools Window -> Gradle. A small Panel from the right of the screen will come out as shown below.
STEP 3: Now inside the Gradle window go to your app name -> Tasks -> android. Double click on singingReport to run this script a small window at the bottom will come and execute a task after executing you will see the output as shown below.
STEP 4 : Inside run window click on Toggle to plain text view as shown below.
after you toggle to plain text view you can see debug MD5 and SHA1 fingerprint as shown below.
How to create release SHA1 fingerprint
STEP 1 : Go to Build -> Generate Signed APK. Window will popup as shown below.
STEP 2: Now if you already created a Keystore file then you can provide an existing Keystore path or create a new one by clicking on Create new button. Provide Alias, Password, and all other info as you want and create it as shown below. and click on the Next button.
STEP 3: In the next window select build type as a release and check V2 (Full APK Signature). Click finish this will start creating Signed in APK and Keystore file.
STEP 4: After finished creating signed APK and Keystore file right click app folder go to module setting inside config and new config provide all the info as we entered while creating signed apk as shown below.
STEP 5: Now again go to View -> Tools Window -> Gradle. Double click on singingReport to run this script a small window at the bottom will come and execute a task after executing you will see the output as shown below.
STEP 6 : Inside run window click on Toggle to plain text view as shown below.
after you toggle to plain text view you can see release MD5 and SHA1 fingerprint as shown below.
If you still have any queries, please post them in the comments section below, I will be happy to help you.