Linux SHA256 checksum generates incorrectly encoded output.

huangapple go评论66阅读模式
英文:

Linux SHA256 checksum generates incorrectly encoded output

问题

我正在尝试验证一些 Android 应用 APK 的校验和。我在 Linux 环境下工作。

对于其中一个文件,这个命令可以正常工作:

sha256sum 文件名

但对于另一个文件(Signal 应用的 APK),我得到了以下输出:

f2f3fe7538608f2a6c43022f09216093fffb6b37e2ffed196afe4432cdb08d71

我希望得到的输出是:

29:F3:4E:5F:27:F2:11:B4:24:BC:5B:F9:D6:71:62:C0
EA:FB:A2:DA:35:AF:35:C1:64:16:FC:44:62:76:BA:26

这似乎是一个编码问题(假设 APK 是合法的),但我不确定如何以正确的编码生成输出。

英文:

I'm trying to verify the checksum of a couple of Android app APKs. I'm working in a Linux environment.

For one of the files, this command worked fine:

sha256sum filename

But for the other file (the Signal app APK), I got the following output:

f2f3fe7538608f2a6c43022f09216093fffb6b37e2ffed196afe4432cdb08d71 

I was aiming for this output:

29:F3:4E:5F:27:F2:11:B4:24:BC:5B:F9:D6:71:62:C0
EA:FB:A2:DA:35:AF:35:C1:64:16:FC:44:62:76:BA:26

This seems to be an encoding issue (assuming the APK is legit), but I'm not sure how to generate the output in the correct encoding.

答案1

得分: 0

你所看到的是APK指纹,而不是sha-256校验和。

查看以下答案以通过keytool(Java密钥库工具)获取它:

https://stackoverflow.com/a/42290810/6645076

英文:

What you are looking at is the APK fingerprint and not the sha-256 checksum.

See the following answer for obtaining that via the keytool (a Java keystore tool)

https://stackoverflow.com/a/42290810/6645076

huangapple
  • 本文由 发表于 2023年6月5日 22:28:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76407461.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定