Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release.Digests.validate method #39

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Add release.Digests.validate method #39

merged 1 commit into from
Nov 15, 2024

Conversation

theory
Copy link
Member

@theory theory commented Nov 14, 2024

Validates a file path against one or more SHA digests. Uses the sha1 and sha2 crates, which are part of the Rust Crypto project. Uses the constant_time_eq crate to compare the values. A new Digest error variant reports digest mismatches, displaying them has hex strings.

Disable automatic line-ending conversion in JSON files to prevent test failures on Windows.

@theory theory added the enhancement New feature or request label Nov 14, 2024
@theory theory requested a review from vrmiguel November 14, 2024 22:14
@theory theory self-assigned this Nov 14, 2024
Base automatically changed from release-thiserror to main November 14, 2024 22:17
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (bf6db96) to head (10c559b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #39   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         1088      1126   +38     
=========================================
+ Hits          1088      1126   +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@theory theory force-pushed the checksum-validation branch from 729622f to 4752e71 Compare November 14, 2024 22:33
Validates a file path against one or more SHA digests. Uses the `sha1`
and `sha2` crates, which are part of the [Rust Crypto] project. Uses the
`constant_time_eq` crate to compare the values. A new `Digest` error
variant reports digest mismatches, displaying them has hex strings.

Disable automatic line-ending conversion in JSON files to prevent test
failures on Windows.

  [Rust Crypto]: https://github.com/RustCrypto
@theory theory force-pushed the checksum-validation branch from 4752e71 to 10c559b Compare November 14, 2024 23:03
@theory theory merged commit 10c559b into main Nov 15, 2024
138 checks passed
@theory theory deleted the checksum-validation branch November 15, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants