Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: CRC32 Hash Missmatch

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131411] Re: CRC32 Hash Missmatch
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sat, 20 Jul 2013 06:00:14 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20130718065947.625CD69DB@smc.vnet.net>

On my Mac I get the same difference as you with v7; however, both v8 and v9
give the expected identical results:

$Version


"9.0 for Mac OS X x86 (64-bit) (January 24, 2013)"


"Hello, World!" //
   StringToStream //
  FileHash[#, "CRC32"] & //
 IntegerString[#, 16, 8] &


"ec4ac3d0"


"Hello, World!" //
  Hash[#, "CRC32"] & //
 IntegerString[#, 16, 8] &


"ec4ac3d0"


% == %%


True



Bob Hanlon


On Thu, Jul 18, 2013 at 2:59 AM, roby <roby.nowak at 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 ???
>
>




  • Prev by Date: Re: CRC32 Hash Missmatch
  • Next by Date: Writing numeric data to CSV does not write final EOL
  • Previous by thread: Re: CRC32 Hash Missmatch
  • Next by thread: Re: CRC32 Hash Missmatch