JDK 7 changes keytool output

我是研究僧i 提交于 2019-11-28 10:27:12

The keytool command has the parameter -keyalg that takes an algorithm name and generates the key according to that algorithm. As far as I understand, it just means that the default algorithm for that command has changed.

I do not know whether it is a conscious choice or a bug - you may want to report it to Oracle.

keytool.exe -v provides you different fingerprints, such as MD5 etc.

exampl: C:[jedk path]\bin\keytool.exe" -v -list -keystore "C:\Document s and Settings\Administrator.android\debug.keystore"

Use -digestalg SHA1 -sigalg MD5withRSA with jarsigner.

To elaborate on the accepted answer:

With JDK 1.7 I was having Authorization failure issues. I finally figured out how to generate the right debug keystore, using SHA1. Here's the command I used:

keytool -genkey -v -keyalg RSA -sigalg SHA1withRSA -keystore "%USERPROFILE%\.android\debug.keystore" -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"

After generating it, you can see it by using the command:

keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

The Signature algorithm should now read "SHA1withRSA". Copy the SHA1 fingerprint and paste it in the Google console "Key for Android apps", and you should be good to go.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!