Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How to use perl digest module to calculate CRC?

by RichardK (Vicar)
on Mar 20, 2013 at 16:12 UTC ( #1024564=note: print w/ replies, xml ) Need Help??


in reply to How to use perl digest module to calculate CRC?

Exactly what is your input data? is it the hex number 0x1e5, (485 decimal), or the string "0x1e5" ?

Perl handles these two differently so try running these one liners, and it might make things clearer

perl -E 'my $x=0x1e5; say $x;' # will print 485 perl -E 'my $x="0x1e5"; say $x;' #will print 0x1e5


Comment on Re: How to use perl digest module to calculate CRC?
Download Code
Replies are listed 'Best First'.
Re^2: How to use perl digest module to calculate CRC?
by guyra (Novice) on Mar 21, 2013 at 08:24 UTC

    My input data is actualy 1e5

    Meaning it is 0001 1110 0101

    Eventtually I'm going to have a long file with bytes in hex which I need to calculate CRC on.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024564]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2015-08-04 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (68 votes), past polls