Hi, I'm using a MD5 hash and I get a binary number output like this if I print it: #{CF020BEF44D3833F79022FA1D7F6D80CEA3639EF} I'm trying to get this as a string so I can write it to a file, however I can only get the first 8 characters: CF0202BE I guess this is limited by integer size in the conversion. (i used to-hex to-integer) Is there a solution? thanks, geoff
Try this calcMD5: func [ binData ] [ enbase/base checksum/method binData 'md5 16 ] And if you have a large file, you can use a checksum port like this http://www.rebol.com/cgi-bin/blog.r?view=0278
Graham, Thanks! I was using the second method, and now I've discovered the enbase function. My working demo: Rebol [ Title: "MD5 test" ] sport: open [scheme: 'checksum algorithm: 'md5] insert sport "Hello World" insert sport "more Hello World" update sport out: copy sport close sport print out print enbase/base out 16 Thanks again, Geoff
Geoff, no probs. And here's a new function from Andreas http://www.rebol.org/view-script.r?script=md5sum.r which has just been posted to the library.