md5lazyIO :: LBS.ByteString -> IO Hash
md5lazyIO lbs = do
    allocaBytes (fromIntegral $ get_md5_statesize) $ \msp -> do
        let ms = MState msp
        md5_init ms
        forM_ (LBS.toChunks lbs) $ \bs -> do
            BS.unsafeUseAsCStringLen bs $ \ (x,y) -> md5_append ms (castPtr x) (fromIntegral y)
        allocaBytes 16 $ \digest -> do
            md5_finish ms digest
            readDigest digest
md5lazyIO :: LBS.ByteString -> IO Hash
md5lazyIO lbs = do
    allocaBytes (fromIntegral $ get_md5_statesize) $ \msp -> do
        let ms = MState msp
        md5_init ms
        forM_ (LBS.toChunks lbs) $ \bs -> do
            BS.unsafeUseAsCStringLen bs $ \ (x,y) -> md5_append ms (castPtr x) (fromIntegral y)
        allocaBytes 16 $ \digest -> do
            md5_finish ms digest
            readDigest digest
md5lazyIO lbs = do
    allocaBytes (fromIntegral $ get_md5_statesize) $ \msp -> do
        let ms = MState msp
        md5_init ms
        forM_ (LBS.toChunks lbs) $ \bs -> do
            BS.unsafeUseAsCStringLen bs $ \ (x,y) -> md5_append ms (castPtr x) (fromIntegral y)
        allocaBytes 16 $ \digest -> do
            md5_finish ms digest
            readDigest digest