Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 如何获取签名证书的SHA256 #186

Open
soapgu opened this issue Jan 11, 2023 · 0 comments
Open

Android 如何获取签名证书的SHA256 #186

soapgu opened this issue Jan 11, 2023 · 0 comments
Labels
problem problem or trouble 安卓 安卓

Comments

@soapgu
Copy link
Owner

soapgu commented Jan 11, 2023

  • 起因

做一个SDK的对接,需要用到签名的SHA256
不是太明白细节原理,还是先按照文档来获取

先拿一个我常用的jks试试水看看
输入 keytool -v -list -keystore xxx.jks
前面输入部分正常
图片
但是签名部分
图片
MD5和SHA1内容都是正常的
SHA256: SHA256withRSA 怎么看上去都不像是一个“正常”的内容

  • Plan B

文档上看都是用keytool命令行一条路了。
Plan B只能另找出路,还好StackOverflow没有让我失望过

上面说这是一个keytool的一个bug,是locale设置引起,当然这个bug起因也不深究了。
可以用gradle signingReport来解决
还有小插曲JAVA版本不匹配
图片
这个问题在做命令行单元测试的时候碰到过,切一下后解决

图片

@soapgu soapgu added 安卓 安卓 problem problem or trouble labels Jan 11, 2023
@soapgu soapgu changed the title Android 如果获取签名证书的SHA256 Android 如何获取签名证书的SHA256 Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem problem or trouble 安卓 安卓
Projects
None yet
Development

No branches or pull requests

1 participant