mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 13:37:48 +00:00
cksum/hashsum: refactor the common code.
Summary of the change: * Move the common code into checksum * Create a structure HashAlgorithm to handle the algorithm (instead of the 3 variables) * Use the same function for cksum & hashsum for --check (perform_checksum_validation) * Use the same for function for the hash generation (digest_reader) * Add unit tests * Add integration tests * Fix some incorrect tests
This commit is contained in:
parent
3523268936
commit
dbe7a20e08
8 changed files with 1046 additions and 891 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -3407,6 +3407,7 @@ dependencies = [
|
|||
"number_prefix",
|
||||
"once_cell",
|
||||
"os_display",
|
||||
"regex",
|
||||
"sha1",
|
||||
"sha2",
|
||||
"sha3",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue