jks or pkcs12: which one should I use to sign the apk for Google Play Store?

自作多情 提交于 2019-12-24 05:35:29

问题


Android Studio 3.5.3, after the creation of my new Key Store, suggests me to convert it using this command:

keytool -importkeystore -srckeystore /path/myKeyStore.jks -destkeystore /path/myKeyStore.jks -deststoretype pkcs12

On the Web and on SO I read a little about it (for example the pkcs12 format is widely supported regardless of the programming language used to read it) but I can't find the answer to this question:

Is the format pkcs12 perfectly compatible with Google Play Store to publish my Apps?

If yes, which one should I use to sign my apks and why?

Thanks a lot!


回答1:


Both pkcs12 and jks are formats holding the public and private key (PPK) used for signing the APK for release and publishing on Google Play Store. It doesn't matter how the PPK is stored as long you can use it for signing. Certain tools or services might prefer using one format over the other and converting between them is by using either command line tools, KeyStore Explorer or similar. Regardless of the conversion direction, the PPK contained stays always the same.

Convert from PKCS12 to JKS

Convert from JKS to PKCS12

KeyStore Explorer




回答2:


jks is java key store, which is more of a java related format, and you can use it directly for signing your release apks for the playstore. So if you're just going to be using it for this purpose, you don't really need to convert it to pkcs12. PKCS12 is not specific to java. If you want to store other keys for other purposes, in the same key store, in a language-neutral format, you may want to convert it to pkcs12.



来源:https://stackoverflow.com/questions/59317011/jks-or-pkcs12-which-one-should-i-use-to-sign-the-apk-for-google-play-store

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