Using keytool to get the MD5 signature of a certificate

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.

Answer:1

There is another Post about this same thing How can I get the MD5 fingerprint from Java's keytool, not only SHA-1?

I guess JDK 1.7 defaults to SHA1. To fix this the following has worked:

C:\Program Files\Java\jdk1.7.0\bin>keytool -v -list -alias
androiddebugkey -keystore debug.keystore -storepass android -keypass android

I tried this, and it worked for me. It gives you MD%, SHA1, SHA256 and Signature Algorithm Name. In that order.

Answer:2
keytool -exportcert -alias alias -keypass keypass -keystore ./test.keystore -storepass 123456 | md5sum
Answer:3

Have you tried the keytool command as:

$ keytool -list -keystore ~/.android/debug.keystore

More on getting Map API Key is Here: http://code.google.com/android/maps-api-signup.html

Update:

As you are using JDK 1.7, there is a new command line argument to its keytool, namely -keyalg.

I know you can specify -keyalg RSA, so maybe -keyalg MD5 will give you the right key.

Answer:4

someArray.splice(a,b,...) method in JavaScript adds or removes items to/from array. What could be good and simple solution to implement such method in Java language? Assume we have String[] array.

I have code like this: TextBox txt = new TextBox(){ public void onLoad(){ this.addFocusHandler(new FocusHandler(){ //some codes here //if I use "this" keyword, it refers to the ...

I want the functionality of the Stanford Core NLP, written in java, to be available in C++. To do this I am making use of the Java Native Interface. I have a Java object that wraps multiple functions ...

I am successfully parsing and evaluating a javascript file with Duktape in my Android application using Kotlin. val file_name = "lib.js" val js_string = application.assets.open(file_name)....