Skip to content

Make sure that padding is used in Hashing#360

Merged
bodiam merged 1 commit into
datafaker-net:mainfrom
CucumisSativus:add-padding-to-hashing
Sep 15, 2022
Merged

Make sure that padding is used in Hashing#360
bodiam merged 1 commit into
datafaker-net:mainfrom
CucumisSativus:add-padding-to-hashing

Conversation

@CucumisSativus

Copy link
Copy Markdown
Contributor

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.

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-commenter

codecov-commenter commented Sep 15, 2022

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.86%. Comparing base (59e77b8) to head (0d7aa6f).
Report is 1046 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@bodiam

bodiam commented Sep 15, 2022

Copy link
Copy Markdown
Contributor

Nice work @CucumisSativus , appreciate the PR!

@bodiam bodiam merged commit 822ae29 into datafaker-net:main Sep 15, 2022
@CucumisSativus CucumisSativus deleted the add-padding-to-hashing branch September 15, 2022 15:33
@CucumisSativus

Copy link
Copy Markdown
Contributor Author

@bodiam thanks a lot for a quick merge! How long could it take before the new version is released to maven central?

@bodiam

bodiam commented Sep 15, 2022

Copy link
Copy Markdown
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.

@CucumisSativus

Copy link
Copy Markdown
Contributor Author

@bodiam thanks a lot!

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.

3 participants