on master help sign in
Merge pull request #170 from koterpillar/cryptohash-cryptoapi

Switch to cryptohash-cryptoapi

commit6eeea8822e858782ae2052baf3050cd90a3bafcd authorMichael Snoyman <michael@snoyman.com> dateSun 1 Sep 2013, 02:42 (13 years ago) parent10471885cda8ad
3 files changed+6−4
wai-app-static/WaiAppStatic/Storage/Embedded.hs+3−2 wai-app-static/WaiAppStatic/Storage/Filesystem.hs+1−1 wai-app-static/wai-app-static.cabal+2−1
wai-app-static/WaiAppStatic/Storage/Embedded.hs+3−2
@@ -15,7 +15,8 @@ import Data.Function (on)
1515import qualified Data.Text as T
1616import Data.Ord
1717import qualified Data.ByteString as S
18−import qualified Crypto.Hash.MD5 as MD5
18+import qualified Crypto.Classes as CR
19+import Crypto.Hash.CryptoAPI (hash', MD5)
1920import qualified Data.ByteString.Base64 as B64
2021import WaiAppStatic.Storage.Filesystem (defaultFileServerSettings)
2122
@@ -89,4 +90,4 @@ bsToFile name bs = File
8990 }
9091
9192runHash :: ByteString -> ByteString
92−runHash = B64.encode . MD5.hash
93+runHash = B64.encode . CR.encode . (hash' :: S.ByteString -> MD5)
wai-app-static/WaiAppStatic/Storage/Filesystem.hs+1−1
@@ -27,7 +27,7 @@ import System.PosixCompat.Files (fileSize, getFileStatus, modificationTime, isRe
2727import Data.Maybe (catMaybes)
2828import qualified Crypto.Conduit
2929import Data.Serialize (encode)
30−import Crypto.Hash.MD5 (MD5)
30+import Crypto.Hash.CryptoAPI (MD5)
3131import qualified Data.ByteString.Base64 as B64
3232
3333-- | Construct a new path from a root and some @Pieces@.
wai-app-static/wai-app-static.cabal+2−1
@@ -37,7 +37,8 @@ library
3737 , text >= 0.7
3838 , blaze-builder >= 0.2.1.4
3939 , base64-bytestring >= 0.1
40− , cryptohash >= 0.7
40+ , crypto-api >= 0.12.2
41+ , cryptohash-cryptoapi >= 0.1.0
4142 , system-filepath >= 0.4
4243 , system-fileio >= 0.3
4344 , http-date