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

Support binary files via digest_file #2

Merged
merged 1 commit into from
Nov 1, 2021

Conversation

cameron1024
Copy link
Contributor

By reading into a String and then calling as_bytes(), digest_file will error if given a file containing non-UTF-8 data.
This change skips the intermediate String and reads straight to a Vec<u8>, allowing binary files to be hashed

By reading into a `String` and then calling `as_bytes()`, `digest_file` will error if given a file containing non-UTF-8 data.
This change skips the intermediate `String` and reads straight to a `Vec<u8>`, allowing binary files to be hashed
@baoyachi baoyachi merged commit d3563ba into baoyachi:master Nov 1, 2021
@baoyachi
Copy link
Owner

baoyachi commented Nov 1, 2021

hi @cameron1024

fix with new version:

sha256 = "1.0.3"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants