vincenthz / hs-cryptohash

efficient and practical cryptohashing in haskell. DEPRECATED in favor of cryptonite
Other
30 stars 24 forks source link

fix test failures on big-endian systems #13

Closed cjwatson closed 11 years ago

cjwatson commented 11 years ago

This fixes test failures on big-endian systems. You can see failing test output here:

https://launchpadlibrarian.net/134406777/buildlog_ubuntu-raring-powerpc.haskell-cryptohash_0.8.3-1build1_FAILEDTOBUILD.txt.gz

I've tested this on the current Ubuntu development branch, on both i386 and powerpc.

vincenthz commented 11 years ago

thanks that looks good. one things is that you can avoid the temporary copy in the 3 finalization functions by copying to out (casted to u64) directly.

cjwatson commented 11 years ago

Wouldn't that go wrong when the size of output required is not a multiple of 8? That's certainly the case for at least some uses of Skein.

vincenthz commented 11 years ago

ah absolutely. not sure what i was thinking when i replied.