[Haskell-cafe] MD5?

Stefan O'Rear stefanor at cox.net
Fri Nov 9 20:57:15 EST 2007


On Fri, Nov 09, 2007 at 09:05:58PM +0000, Andrew Coppin wrote:
> The MD5SUM.EXE file I have chokes if you ask it to hash a file in another 
> directory. It will hash from stdin, or from a file in the current 
> directory, but point-blank refuses to hash anything else. So I'd have to 
> write my Haskell code to open the file I want and *pipe* it to stdin on 
> MD5SUM.EXE (making sure to not translate line ends or anything else that 
> will alter the hash code). Then I have to parse the output and change it to 
> actually match the UNIX md5sum program. [Because I want to make it 
> compatible with that.] That also involves some fun with line ends...

I'm drawing a blank on the windows API, but at least in DOS it was
possible to redirect standard input from a file without involving your
program.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20071109/f731130d/attachment-0001.bin


More information about the Haskell-Cafe mailing list