Skip to content

Commit 8e58efa

Browse files
committed
publish: represent the crc64 in string format
1 parent f663bba commit 8e58efa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

publish/Crc64.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ final class Crc64
156156
0xD80C07CD << 32 | 0x676F8394, 0x9AFCE626 << 32 | 0xCE85B507,
157157
];
158158

159-
public static function make(string $value): int
159+
public static function make(string $value): string
160160
{
161161
// Final XOR: 0xFFFFFFFFFFFFFFFF
162162
$finalXor = (1 << 64) - 1;
@@ -177,7 +177,7 @@ public static function make(string $value): int
177177

178178
$checksum = static::reflect64($checksum);
179179

180-
return $checksum ^ $finalXor;
180+
return sprintf('%u', $checksum ^ $finalXor);
181181
}
182182

183183
private static function reflect8(int $value): int

publish/publish.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function fileUpload(OssClient $client, string $bucket, string $object, string $f
140140
]);
141141
}
142142

143-
function fileChecksum(string $filename): int
143+
function fileChecksum(string $filename): string
144144
{
145145
$contents = file_get_contents($filename);
146146

0 commit comments

Comments
 (0)