mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-05 18:25:31 +08:00
Fixed: Fix bootstrap checksum check if it contained leading zeros
This commit is contained in:
@@ -156,6 +156,7 @@ def downloadBootstrap(String arch, String expectedChecksum, String version) {
|
|||||||
digest.update(buffer, 0, readBytes)
|
digest.update(buffer, 0, readBytes)
|
||||||
}
|
}
|
||||||
def checksum = new BigInteger(1, digest.digest()).toString(16)
|
def checksum = new BigInteger(1, digest.digest()).toString(16)
|
||||||
|
while (checksum.length() < 64) { checksum = "0" + checksum }
|
||||||
if (checksum == expectedChecksum) {
|
if (checksum == expectedChecksum) {
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user