检查android keystore keypass的正确性 [英] Check android keystore keypass for correctness
问题描述
我正在自动执行一些涉及android keytool和jarsigner的事情.该工具需要一个密钥库,密钥库的密码,别名和别名/密钥的密码,而我正试图找到一种方法来显式检查以查看所提供的别名/密钥是否正确
I'm automating some things that involve the android keytool and jarsigner. The tool takes a keystore, the password for the keystore, the alias name, and the password for the alias / key, and I'm trying to find a way to explicitly check to see if the supplied password for the alias / key is correct.
有什么想法吗?另外,我需要在没有jar文件签名的情况下进行检查-在我的上下文中获取该文件很长,因此我希望早日中止.
Any ideas? Also, I need to check it without a jar file to sign - getting that file in my context is lengthy, so I want to abort sooner rather than later.
推荐答案
您也可以检查密码是否正确,而无需尝试更改密码.我通过使用以下命令列出密钥库的属性来做到这一点:
You can also check if the password is correct without attempting to change the password. I did it by listing the properties of the keystore with this command:
keytool -list -keystore <keystorefile> -storepass <passwordtocheck>
这篇关于检查android keystore keypass的正确性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!