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.
TLDR
php is interesting: this change makes it easier to validate the checksum in different langauges by using the IEEE CRC32 polynomial
Reason for Change
So when implementing the validator for the checksum I noticed that PHP actually has a rich history with CRC32.
The
crc32()
method uses the IEEE polynomial that's become the defacto standard, but thehash('crc32'…)
method uses a different polynomial that then becomes more difficult to validate in languages other than php. Thehash()
method calls the algorithmcrc32b
when you want to use the IEEE polynomial.After working away on this issue in golang for awhile, I realized it would be better for the community to update it to the more universal polynomial.
After this change the one last thing to watchout for with this is that php reverses the crc32 byteorder compared to most other languages, but that can easily be overcome in the validator.