Skip to content

[CRC32_C] Compute result is negative value #3

@zjhiphop

Description

@zjhiphop

For example:

// for (0-100 hex)
let data = '0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F6061626364';
let buf = Buffer.from(data, 'hex'); 
let crc = CRC.default("CRC32_C");
let computed_crc = crc.compute(source);
// output is: -5DA0519C

But for correct value should be 0xA25FAE64, you can test in website 'http://crccalc.com/' with the same data and 'hex' option selected.

Pls help to check it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions