Let us explain the problem properly. There are in fact two different hashes when registering an app on Azure portail.
- One is used for developing the app and all developers have to specify their own signature because their environment differ.
- One is used for releasing your app in production. This kind of hash is unique and all developers can use the same hash.
In case of an Android app, Android studio will compute a debug key which is not what we want when releasing in production mode. The portion of code provided above computes a debug hash which is in fact linked with the development hash signature called by Microsoft.
below a screenshot of the panel displayed on the Azure portail where you can find these two hashes:
To conclude, be careful of what you want and what Microsoft provides.