Make sure that padding is used in Hashing#360
Merged
Conversation
In some cases it's possible to have MD5 hash (and possibly other as well) with the first byte set to 0. In this case it gets removed, while converting to BigInteger and the hex string has 31 characters. To make sure that it works as expected, we need to guarantee proper padding.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
============================================
+ Coverage 94.80% 94.86% +0.05%
- Complexity 1937 1938 +1
============================================
Files 203 203
Lines 3872 3872
Branches 385 385
============================================
+ Hits 3671 3673 +2
+ Misses 102 101 -1
+ Partials 99 98 -1 ☔ View full report in Codecov by Sentry. |
Contributor
|
Nice work @CucumisSativus , appreciate the PR! |
Contributor
Author
|
@bodiam thanks a lot for a quick merge! How long could it take before the new version is released to maven central? |
Contributor
|
@CucumisSativus a new snapshot is released after every merge, and they're generally pretty stable, so if that's something you can use for the time being, I'd recommend that. Otherwise we usually release a version about once a month. |
Contributor
Author
|
@bodiam thanks a lot! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some cases it's possible to have MD5 hash (and possibly other as well) with the first byte set to 0. In this case it gets removed, while converting to BigInteger and the hex string has 31 characters. To make sure that it works as expected, we need to guarantee proper padding.