in reply to Re: CRC checking
in thread CRC checking

I had a look at Digest::CRC and believe it will do what I want but documentation is very limited. Can you explain init, xorout, refin and refout? I understand the width and poly fields.

Replies are listed 'Best First'.
Re^3: CRC checking
by Tomte (Priest) on Jun 17, 2004 at 10:20 UTC

    A quick glance at the source suggests that they are flags/values indicating/used for:

    • refin
      reflect bitwise (mirror) the input before processing the message
    • refout
      reflect bitwise (mirror) the processed data before returning (hmmm, unless refin is set...)
    • xorout
      the output is XORed with this value prior to returning it
    • init
      is the initial crc value
    Update: (added init explanation) I suggest you take a closer look at the %_typedef hash!

    Edit: removed doubt-indicating questionmarks.

    HTH, regards,
    tomte


    An intellectual is someone whose mind watches itself.
    -- Albert Camus