Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: CRC32 Hash Missmatch
Replies: 2   Last Post: Jul 20, 2013 5:53 AM

 Messages: [ Previous | Next ]
 Sseziwa Mukasa Posts: 108 Registered: 8/26/07
Re: CRC32 Hash Missmatch
Posted: Jul 20, 2013 5:53 AM

(Debug) In[13]:= IntegerString[FileHash[StringToStream["Hello, World!"], "CRC32"], 16, 8]
IntegerString[Hash["Hello, World!", "CRC32"], 16, 8]
"Hello, World!" // StringToStream // FileHash[#, "CRC32"] & //
IntegerString[#, 16, 8] &
"Hello, World!" // Hash[#, "CRC32"] & // IntegerString[#, 16, 8] &
(Debug) Out[13]= "ec4ac3d0"
(Debug) Out[14]= "ec4ac3d0"
(Debug) Out[15]= "ec4ac3d0"
(Debug) Out[16]= "ec4ac3d0"

On Jul 18, 2013, at 2:59 AM, roby <roby.nowak@gmail.com> wrote:

> Dear Group,
>
> I am trying to calculate a CRC 32 checksum with Mathematica 7, it seems that:
>
> Hash[data, "CRC32"]
>
> gives different values opposed to:
>
> FileHash["datafile", "CRC32"]
>
>
>
> In[613]:=
> "Hello, World!"//
> StringToStream //
> FileHash[#, "CRC32"]& // IntegerString[#, 16, 8]&
>
> Out[613]= "ec4ac3d0"
>
>
>
> In[615]:= "Hello, World!"//
> Hash[#, "CRC32"]& // IntegerString[#, 16, 8]&
>
> Out[615]= "a776c351"
>
>
> Bug or feature or different generating polynomial ???
>

Date Subject Author
7/20/13 Sseziwa Mukasa
7/20/13 Bob Hanlon