Skip to content

Problem with 0x00 #36

@TGMM

Description

@TGMM

So I generated the C source code using the following parameters.
python pycrc.py --width 8 --algorithm tbl --poly 0x31 --reflect-in true --reflect-out true --xor-in 0x10 --xor-out 0xF7 --generate c -o crc.c

I'm using http://www.sunshine2k.de/coding/javascript/crc/crc_js.html to confirm my output.
And I noticed that using 0x00 gives me a different value on the C source code than on the JS calculator.
With this parameters 0x00 should output 0x35 but on the C code it's outputting 0xFF.
Also note that using any chain that contains 0x00 also gives a different output.
Ex. {0xFE, 0x61, 0x01, 0x00, 0x16, 0x02, 0x00, 0x14, 0x8C} should be 0x24 but it's 0x6b on the C code.
Is there something I can do to make the C code match the JS calculator?

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