Why never gives the same result than others crc32? #10
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/js-crc32#10
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I was trying with a single string and im getting wierd result with negative numbers...
https://www.functions-online.com/crc32.html
4ff9fc6e4e5d5f590c4f2134a8cc96d1 = 3264575876
Your code:
-1030391420
It's mentioned in the README:
This decision was made for performance reasons.
The website you linked is giving you the unsigned value. If you want to convert to unsigned, use an unsigned right shift:
(-1030391420) >>> 0 == 3264575876
will give you the correct value.Note: The web demo http://oss.sheetjs.com/js-crc32/ includes both forms:
That output is generated as follows: