Skip to content

Commit cf4bd4e

Browse files
luk1337gunnarbeutner
authored andcommitted
cksum: Display adler32/crc32 sums as hex numbers
This basically follows what `crc32` and `xrdadler32` does on Linux distros.
1 parent c5df5e5 commit cf4bd4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Userland/Utilities/cksum.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ int main(int argc, char** argv)
6363
fail = true;
6464
continue;
6565
}
66-
outln("{} {} {}", crc32.digest(), st.st_size, path);
66+
outln("{:08x} {} {}", crc32.digest(), st.st_size, path);
6767
} else if (algorithm == "adler32") {
6868
Crypto::Checksum::Adler32 adler32;
6969
while (!file->eof() && !file->has_error())
@@ -73,7 +73,7 @@ int main(int argc, char** argv)
7373
fail = true;
7474
continue;
7575
}
76-
outln("{} {} {}", adler32.digest(), st.st_size, path);
76+
outln("{:08x} {} {}", adler32.digest(), st.st_size, path);
7777
} else {
7878
warnln("{}: Unknown checksum algorithm: {}", argv[0], algorithm);
7979
exit(1);

0 commit comments

Comments
 (0)