diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2011-08-27 12:16:03 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2011-08-27 12:16:03 +0200 |
commit | de01fdf9dd0144adbdcce8759e98c50e61e6055d (patch) | |
tree | d239d87162f1e6a9fb4f17a3a82efdf1f04c91ba /src/Hakyll/Core/Resource | |
parent | 903dda08ea9a366b12ddc3f68e51cd569eeb39ea (diff) | |
download | hakyll-de01fdf9dd0144adbdcce8759e98c50e61e6055d.tar.gz |
Use cryptohash instead of hopenssl
Diffstat (limited to 'src/Hakyll/Core/Resource')
-rw-r--r-- | src/Hakyll/Core/Resource/Provider.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Hakyll/Core/Resource/Provider.hs b/src/Hakyll/Core/Resource/Provider.hs index 16b9220..808719a 100644 --- a/src/Hakyll/Core/Resource/Provider.hs +++ b/src/Hakyll/Core/Resource/Provider.hs @@ -20,14 +20,12 @@ module Hakyll.Core.Resource.Provider import Control.Applicative ((<$>)) import Control.Concurrent (MVar, readMVar, modifyMVar_, newMVar) -import Control.Monad ((<=<)) -import Data.Word (Word8) import Data.Map (Map) import qualified Data.Map as M +import qualified Crypto.Hash.MD5 as MD5 +import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as LB -import OpenSSL.Digest.ByteString.Lazy (digest) -import OpenSSL.Digest (MessageDigest (MD5)) import Hakyll.Core.Store import Hakyll.Core.Resource @@ -60,8 +58,8 @@ resourceExists provider = flip elem $ resourceList provider -- | Retrieve a digest for a given resource -- -resourceDigest :: ResourceProvider -> Resource -> IO [Word8] -resourceDigest provider = digest MD5 <=< resourceLBS provider +resourceDigest :: ResourceProvider -> Resource -> IO B.ByteString +resourceDigest provider = fmap MD5.hashlazy . resourceLBS provider -- | Check if a resource was modified -- |