Giving -ve CheckSum for formData. #2
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/js-adler32#2
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?
Hi I am using this library in my current project. It gives perfect checksum for the Test Strings, but in my real scenario I need to calculate the checksum of my formdata.
A typical formdata will be like;
var ADLER32 = require('adler-32'); let checkSum = ADLER32.str("formdata={\"data\":\"value\", \"key\":\"value1\", \"key2\":\"value2\"}123456");
I get a negative checksum for this input. -1415900241
for
let checkSum = ADLER32.str("SheetJS");
I get proper checksum Value. 176947863
Hoping to get a solution !!!
@deepak4u2006 it is explained in the README:
If you need the unsigned value, convert to unsigned integer with
>>>0
:Note that the web demo displays both types: http://oss.sheetjs.com/js-adler32/
That page uses the
>>>0
trick to generate the unsigned value@SheetJSDev Thanks for the quickest reply ever possible.
adding
>>>0
worked like a dream.Thanks again!!! 👍