PackageInfo.signatures 返回什么? [英] What does PackageInfo.signatures return?

查看:25
本文介绍了PackageInfo.signatures 返回什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么这个值中有多个签名?这些值是包的公钥吗?

Why there are multiple signatures in this value? Are these values the public key of the package?

我可以使用这个签名来唯一标识一个包,而不是读取 META-INF 下的文件,或者计算整个 APK 文件的 MD5 吗?

Can I uniquely identify a package using this signature instead of reading the files under META-INF, or calculating an MD5 on the whole APK file?

推荐答案

根据@hackbod,这是 APK 签名的所有公钥

According to @hackbod, this is all the public keys the APK was signed with

尽管名称如此,PackageInfo.signatures 的内容是您的应用程序使用的公钥.这绝对不会在构建之间发生变化.这是应用开发者的纯身份.

Despite its name, the contents of PackageInfo.signatures is the public keys your app is signed with. This absolutely, positively does not change between builds. This is the pure identify of the developer of the app.

参考:https://groups.google.com/d/msg/android-developers/fPtdt6zDzns/MDqie6k7qo0J

这篇关于PackageInfo.signatures 返回什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆