tjones wrote:
> Strange, I get two completely different values.
>
> cf:
> <cfset theFile = #ExpandPath("./files/SpryAssets.zip")#>
> <cffile action="read" file='#theFile#' variable="xFile" />
> <cfdump var="#hash(xFile)#">
>
>   

I think the difference is that I was using a plain text file. Doing 
cffile action="read" on a binary file and then hashing that is not going 
to yield the same results as doing a hash on the binary file itself.

You'd think you could use readbinary as your cffile action, but the 
Hash() function in CFML only hashes strings. You can't use it on binary 
data.

I'd have to ponder this a bit more or perhaps someone else has a 
solution, but there is no HashBinary() function in CFML even though 
there is an Encrypt/DecryptBinary. So my first thought is find a common 
ground other than an MD5 hash to compare against.

I'll think on this a bit more and let you know if some other solution 
comes to mind. There's MD5 functionality built into Java that could be 
leveraged but I'll have to play with that a bit to get you an example.

-- 
Matthew Woodward
[email protected]
http://mpwoodward.posterous.com
identi.ca/Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint, etc. 
as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html


--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
 http://groups.google.com/group/openbd?hl=en
 official site @ http://www.openbluedragon.org/

!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---

Reply via email to