MathGroup Archive 2009

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

Search the Archive

Re: Hash function


On Mar 14, 3:41 am, Ignacio Plazeta <Ignacio.Plaz... at speednet.es>
wrote:
> Dear Friends
>
> I bet I'm wrong in a childish way but I'm
> incapable to overcome the bug.
>
> Why does the following code return discrepant values
> when processing two identical file ( CRTL + C , CRTL + V )
> placed in two different folders ? Of course, I'm looking on only
> the Hash part of the out, being obviously the folder related part.
>
> Warmest regards.
> Ignacio
>
> fileIdentifier[myFile_]:=Module[{ tmp , folderPos },
>   folderPos = StringPosition[myFile,"\\"]//Flatten//Max;
>   tmp={
>      FileByteCount[myFile],
>      Hash[myFile,"SHA512"],
>      StringJoin[
>       (If[#>10,ToString[#],"0"<>ToString[#]])&/@FileDate[myFile]
>      ],
>      StringTake[myFile,folderPos-1],
>      StringDrop[myFile,folderPos]
>      };
> Return[tmp];
> ]

FileHash?


  • Prev by Date: Re: The "Go Back" Button doesn't work
  • Next by Date: Re: Comparing Corresponding Columns of Two Matrices
  • Previous by thread: Re: Hash function
  • Next by thread: Comparing Corresponding Columns of Two Matrices