Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15193 > unrolled thread

CRC32 Hash Missmatch

Started byroby <roby.nowak@gmail.com>
First post2013-07-18 06:43 +0000
Last post2013-07-22 01:30 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  CRC32 Hash Missmatch roby <roby.nowak@gmail.com> - 2013-07-18 06:43 +0000
    Re: CRC32 Hash Missmatch "Alexey Popkov" <lehin.p@gmail.com> - 2013-07-20 09:52 +0000
    Re: CRC32 Hash Missmatch roby <roby.nowak@gmail.com> - 2013-07-22 01:30 +0000

#15193 — CRC32 Hash Missmatch

Fromroby <roby.nowak@gmail.com>
Date2013-07-18 06:43 +0000
SubjectCRC32 Hash Missmatch
Message-ID<ks82q9$jnc$1@smc.vnet.net>
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 ???

[toc] | [next] | [standalone]


#15202

From"Alexey Popkov" <lehin.p@gmail.com>
Date2013-07-20 09:52 +0000
Message-ID<ksdmlh$501$1@smc.vnet.net>
In reply to#15193
This bug was fixed in version 8. Here you can find a workaround for version 
7:

http://stackoverflow.com/q/1854491

HTH,
Alexey


==============================================================
"roby"  wrote:ks82q9$jnc$1@smc.vnet.net...

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 ??? 

[toc] | [prev] | [next] | [standalone]


#15218

Fromroby <roby.nowak@gmail.com>
Date2013-07-22 01:30 +0000
Message-ID<ksi1vv$huh$1@smc.vnet.net>
In reply to#15193
Am Donnerstag, 18. Juli 2013 08:43:21 UTC+2 schrieb roby:
> 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 ???

Thank you for all your replies,
It seems that starting with Mathematica 8 the issue has been fixed.

Robert

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web