I've been spending a lot of time trying to find a clean way to convert
from a String to a Word64 for the Crypto library.

Specifically, we're trying to encrypt the strings with Blowfish. The
type for the encrypt function is:

encrypt :: (Integral a) => a -> Word64 -> Word64

I assume I would want something like:
toWord64s :: String -> [Word64]
toWord64s = ....

myEncrypt string = map (Blowfish.encrypt myKey) (toWord64s string)

I would have to imagine that encrypting strings is a fairly common
thing to do, so a conversion should be trivial, but I can't seem to
find anything on it. I feel like I must be missing something rather
obvious here. Am I?

Thanks,
Ian
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to