Expand description
Standalone checksum calculation helpers for update integrity verification.
These free functions mirror the private methods on UpdateManager so the
same hashing logic can be unit-tested without constructing a full manager
and can be reused by other modules (e.g. Downloader) without cross-crate
duplication.
Functionsยง
- crc32_
hex - CRC-32 hex digest of
data(8 hex digits, zero-padded). - md5_hex
- MD5 hex digest of
data. - sha256_
file - SHA-256 hex digest of a file at
path. - sha256_
hex - SHA-256 hex digest of
data. - sha512_
hex - SHA-512 hex digest of
data. - verify
- Verify
dataagainst an expected hex digest using the named algorithm. Supported algorithms:sha256,sha512,md5,crc32. Returnstrueon match,falseon mismatch or unknown algorithm.