diff options
| author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2024-02-19 13:58:04 +0100 |
|---|---|---|
| committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2024-02-19 14:08:49 +0100 |
| commit | bc1bca798f6ab91bb513ae010c5a99f91639b125 (patch) | |
| tree | c0e191ac71584b9f4df73c2d4c00744c93d797f2 /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | e4584e84d9a4687bedf1481b60c1751a2478967c (diff) | |
| download | rust-bc1bca798f6ab91bb513ae010c5a99f91639b125.tar.gz rust-bc1bca798f6ab91bb513ae010c5a99f91639b125.zip | |
Fix download hash check on big-endian systems
Ensure the hash_file and hash_dir routines give identical results on big- and little-endian systems. The default hash routines for integer types are endian-dependent, so all such hash inputs need to be byte-swapped. This applies in particular to the file hashes used as input when computing directory hashes. In addition, the default hash routines for composite types use a length prefix, which it itself an integer type (usize). In order to be able to byte-swap that prefix, we have to re-implement those bits of the standard library ourselves.
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
