1.获取APP的签名信息
直接通过一个apk,获取安装到手机的第三方应用签名的apk包。返回值为key的MD5值 详情:
基本信息 | 微信开放文档
2.获取key的MD5
可以使用以下命令查看:
keytool -list -v -keystore test.keystore
Enter keystore password: //输入密码,回车
会输出以下格式信息:
Keystore type: PKCS12
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: test
Creation date: 2019-10-28
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Tester, OU=Test, O=Test, L=HD, ST=BJ, C=CN
Issuer: CN=Tester, OU=Test, O=Test, L=HD, ST=BJ, C=CN
Serial number: 7dd12840
Valid from: Fri Jul 26 20:52:56 CST 2019 until: Sun Jul 02 20:52:56 CST 2119
Certificate fingerprints:
MD5: F9:F6:C8:1F:DB:AB:50:14:7D:6F:2C:4F:CE:E6:0A:A5
SHA1: BB:AC:E2:2F:97:3B:18:02:E7:D6:69:A3:7A:28:EF:D2:3F:A3:68:E7
SHA256: 24:11:7D:E7:36:12:BC:FE:AF:2A:6A:24:BD:04:4F:2E:33:E5:2D:41:96:5F:50:4D:74:17:7F:4F:E2:55:EB:26
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
其中证书指纹信息(Certificate fingerprints):
- MD5 证书的MD5指纹信息(安全码MD5)
- SHA1 证书的SHA1指纹信息(安全码SHA1)
- SHA256 证书的SHA256指纹信息(安全码SHA245)
或者使用AndroidStudio 的gradle工具