I need to get a Google map key for my application and, for this, I need the MD5 signature of my certificate. As seen on the Internet, I use "keytool" to get it :
keytool -list -alias mykey -keystore mykeystore
The problem is that the answer is a SHA1 signature instead of an MD5 signature.
I use JDK 1.7.
What am I doing wrong?
Thanks in advance for the time you will spend trying to help me.
Hello in the year 2021.
The keytool of JDK 8 and newer does not print MD5 anymore, even if you try the standard suggestion to add the "-v" option to the "keygen -list" command.
I guess MD5 is no more considered secure enough and has been removed.
At the same time there are still places like Amazon "Security Profile Management" for LWA etc. requiring you to submit the MD5 signature of your certificate.
Here is a command which will deliver it (use the password "android" for the Android Studio keystore):
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | \
openssl dgst -md5
And if you want to have colon character inbetween, then add the following "sed" command:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | \
openssl dgst -md5 | \
sed 's/[a-fA-F0-9][a-fA-F0-9]/&:/g; s/:$//'
The above command works on Linux, macOS and even Windows (in git bash):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With