As its name implies, ByteString stores a string of bytes, which are Word8. It's a replacement for a list, not for Word8.
David On Wed, Jun 20, 2007 at 09:23:51PM +0100, Dominic Steinitz wrote: > I'm probably missing something here but writing MD5 (and for that matter > SHA1) requires bit twiddling operations (Data.Bits) and these aren't > defined for ByteString. For example, SHA1 defines the following function > and it's not clear to me how you'd implement this for ByteString rather > than Word8. > > f n x y z > | n <= 19 = (x .&. y) .|. ((complement x) .&. z) > | n <= 39 = x `xor` y `xor` z > | n <= 59 = (x .&. y) .|. (x .&. z) .|. (y .&. z) > | n <= 79 = x `xor` y `xor` z > > I'd love to have blazzingly fast implementations for all the functions > in the crypto library so if anyone feels inclined, any contributions > would be very gratefully accepted. Unfortunately, I don't have the time > to do this myself. > > Dominic. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
