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

Fix incorrect checksum issue #377

Merged
merged 2 commits into from Feb 14, 2022
Merged

Fix incorrect checksum issue #377

merged 2 commits into from Feb 14, 2022

Conversation

a-khanna
Copy link
Contributor

This PR corrects a small byte array copying mistake in HashingHelper.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Internationalization and localization
  • Other (please describe):

What is the current behavior?

Issue Number: #373

What is the new behavior?

Correct checksums are generated.
For example, consistency can be verified using certUtil on windows with something like certutil -hashfile <filename> SHA256

Other information

Quality check

Before creating this PR, have you:

  • Followed the code style guideline as described in CONTRIBUTING.md
  • Verified that the change work in Release build configuration
  • Checked all unit tests pass

@veler
Copy link
Collaborator

veler commented Feb 12, 2022

Hello,

Thank you very much for this fix! :) Should we update the Unit Tests?

@a-khanna
Copy link
Contributor Author

@veler Hi, sorry for the late response.
I have added some test cases for checksums on a large file (2MB).
Personally, I avoid placing large files in the solution just to use them in test cases, so I have created a 2MB byte array within the test class here. But please let me know if you prefer testing this in another way.

@veler veler linked an issue Feb 14, 2022 that may be closed by this pull request
@veler
Copy link
Collaborator

veler commented Feb 14, 2022

Thanks @a-khanna ! It looks great! 🎉🚀

@veler veler merged commit af575d6 into DevToys-app:main Feb 14, 2022
@a-khanna a-khanna deleted the bug/bug-373 branch February 15, 2022 17:20
veler pushed a commit that referenced this pull request Mar 31, 2023
* Fix incorrect checksum issue

* Added test cases for large file hashing
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.

Invalid SHA256 checksum for file generated
2 participants