From 31748ddbd00c6a4d7778901abab647d64de5ac12 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Tue, 18 Mar 2014 06:59:20 +0000 Subject: [PATCH] Remove crypto-conduit in favor of the simpler cryptohash-conduit. --- package-list.sh | 2 +- yesod-platform/yesod-platform.cabal | 2 +- yesod-static/Yesod/Static.hs | 10 +++++----- yesod-static/yesod-static.cabal | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package-list.sh b/package-list.sh index 744f06ec..de729ea4 100644 --- a/package-list.sh +++ b/package-list.sh @@ -3,7 +3,7 @@ pkgs=( ./yesod-routes ./yesod-core ./yesod-json - ./crypto-conduit + ./cryptohash-conduit ./authenticate/authenticate ./yesod-static ./yesod-persistent diff --git a/yesod-platform/yesod-platform.cabal b/yesod-platform/yesod-platform.cabal index 4f3dc86e..a92aab8e 100644 --- a/yesod-platform/yesod-platform.cabal +++ b/yesod-platform/yesod-platform.cabal @@ -43,7 +43,7 @@ library , cprng-aes == 0.5.2 , crypto-api == 0.13 , crypto-cipher-types == 0.0.9 - , crypto-conduit == 0.5.2.2 + , cryptohash-conduit == 0.1.0 , crypto-numbers == 0.2.3 , crypto-pubkey == 0.2.4 , crypto-pubkey-types == 0.4.1 diff --git a/yesod-static/Yesod/Static.hs b/yesod-static/Yesod/Static.hs index dd217913..a38bfc23 100644 --- a/yesod-static/Yesod/Static.hs +++ b/yesod-static/Yesod/Static.hs @@ -73,14 +73,14 @@ import Data.List (intercalate) import Language.Haskell.TH import Language.Haskell.TH.Syntax as TH -import Crypto.Conduit (hashFile, sinkHash) -import Crypto.Hash.CryptoAPI (MD5) +import Crypto.Hash.Conduit (hashFile, sinkHash) +import Crypto.Hash (MD5, Digest) import Control.Monad.Trans.State +import qualified Data.Byteable as Byteable import qualified Data.ByteString.Base64 import qualified Data.ByteString.Char8 as S8 import qualified Data.ByteString.Lazy as L -import qualified Data.Serialize import Data.Text (Text, pack) import qualified Data.Text as T import qualified Data.Map as M @@ -359,7 +359,7 @@ mkStaticFilesList fp fs routeConName makeHash = do base64md5File :: Prelude.FilePath -> IO String base64md5File = fmap (base64 . encode) . hashFile - where encode d = Data.Serialize.encode (d :: MD5) + where encode d = Byteable.toBytes (d :: Digest MD5) base64md5 :: L.ByteString -> String base64md5 lbs = @@ -367,7 +367,7 @@ base64md5 lbs = $ runIdentity $ sourceList (L.toChunks lbs) $$ sinkHash where - encode d = Data.Serialize.encode (d :: MD5) + encode d = Byteable.toBytes (d :: Digest MD5) base64 :: S.ByteString -> String base64 = map tr diff --git a/yesod-static/yesod-static.cabal b/yesod-static/yesod-static.cabal index 3423149f..282a6303 100644 --- a/yesod-static/yesod-static.cabal +++ b/yesod-static/yesod-static.cabal @@ -29,7 +29,7 @@ library , old-time >= 1.0 , yesod-core >= 1.2 && < 1.3 , base64-bytestring >= 0.1.0.1 - , cereal >= 0.3 + , byteable >= 0.1 , bytestring >= 0.9.1.4 , template-haskell , directory >= 1.0 @@ -41,8 +41,8 @@ library , http-types >= 0.7 , unix-compat >= 0.2 , conduit >= 0.5 - , crypto-conduit >= 0.4 - , cryptohash-cryptoapi >= 0.1.0 + , cryptohash-conduit >= 0.1 + , cryptohash >= 0.11 , system-filepath >= 0.4.6 && < 0.5 , system-fileio >= 0.3 , data-default @@ -80,8 +80,8 @@ test-suite tests , old-time , yesod-core , base64-bytestring - , cereal , bytestring + , byteable , template-haskell , directory , transformers @@ -92,8 +92,8 @@ test-suite tests , http-types , unix-compat , conduit - , crypto-conduit - , cryptohash-cryptoapi + , cryptohash-conduit + , cryptohash , system-filepath , system-fileio , data-default