Merge pull request #1424 from QuLogic/yesod-static-cryptonite
Convert yesod-static to cryptonite.
This commit is contained in:
commit
c05c2ddde6
@ -24,6 +24,7 @@ extra-deps:
|
||||
- persistent-sqlite-2.5
|
||||
- cookie-0.4.2
|
||||
- cryptonite-0.23
|
||||
- cryptonite-conduit-0.2.0
|
||||
- foundation-0.0.9
|
||||
- memory-0.14.5
|
||||
- hfsevents-0.1.6
|
||||
|
||||
@ -81,7 +81,7 @@ import Crypto.Hash (MD5, Digest)
|
||||
import Control.Monad.Catch (MonadThrow)
|
||||
import Control.Monad.Trans.State
|
||||
|
||||
import qualified Data.Byteable as Byteable
|
||||
import qualified Data.ByteArray as ByteArray
|
||||
import qualified Data.ByteString.Base64
|
||||
import qualified Data.ByteString.Char8 as S8
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
@ -420,7 +420,7 @@ mkStaticFilesList' fp fs makeHash = do
|
||||
|
||||
base64md5File :: FilePath -> IO String
|
||||
base64md5File = fmap (base64 . encode) . hashFile
|
||||
where encode d = Byteable.toBytes (d :: Digest MD5)
|
||||
where encode d = ByteArray.convert (d :: Digest MD5)
|
||||
|
||||
base64md5 :: L.ByteString -> String
|
||||
base64md5 lbs =
|
||||
@ -428,7 +428,7 @@ base64md5 lbs =
|
||||
$ runIdentity
|
||||
$ sourceList (L.toChunks lbs) $$ sinkHash
|
||||
where
|
||||
encode d = Byteable.toBytes (d :: Digest MD5)
|
||||
encode d = ByteArray.convert (d :: Digest MD5)
|
||||
|
||||
base64 :: S.ByteString -> String
|
||||
base64 = map tr
|
||||
|
||||
@ -44,8 +44,9 @@ library
|
||||
, unix-compat >= 0.2
|
||||
, conduit >= 0.5
|
||||
, conduit-extra
|
||||
, cryptohash-conduit >= 0.1
|
||||
, cryptohash >= 0.11
|
||||
, cryptonite-conduit >= 0.1
|
||||
, cryptonite >= 0.11
|
||||
, memory
|
||||
, data-default
|
||||
, mime-types >= 0.1
|
||||
, hjsmin
|
||||
@ -112,8 +113,9 @@ test-suite tests
|
||||
, http-types
|
||||
, unix-compat
|
||||
, conduit
|
||||
, cryptohash-conduit
|
||||
, cryptohash
|
||||
, cryptonite-conduit
|
||||
, cryptonite
|
||||
, memory
|
||||
, data-default
|
||||
, mime-types
|
||||
, hjsmin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user