Skip to content

Commit

Permalink
Move over to cryptohash directly.
Browse files Browse the repository at this point in the history
Pinging @vincenthz, thanks for letting me collapse my dependency tree a
bit more!
  • Loading branch information
snoyberg committed Mar 20, 2014
1 parent af48f2d commit 43bec1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
14 changes: 3 additions & 11 deletions mime-mail-ses/Network/Mail/Mime/SES.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ module Network.Mail.Mime.SES

import Control.Exception (Exception, throwIO)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Crypto.Hash.CryptoAPI (SHA256)
import Crypto.HMAC
import qualified Crypto.Hash.SHA256 as SHA256
import Crypto.MAC.HMAC (hmac)
import Data.ByteString (ByteString)
import Data.ByteString.Base64 (encode)
import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Lazy as L
import Data.Conduit (Sink, await, ($$), (=$))
import qualified Data.Serialize as S
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time (getCurrentTime)
Expand Down Expand Up @@ -123,11 +122,4 @@ data SESException = SESException
instance Exception SESException

makeSig :: ByteString -> ByteString -> ByteString
makeSig payload key =
encode
$ S.encode
$ hmac' (MacKey key) payload
`asTypeOf` x
where
x :: SHA256
x = undefined
makeSig payload key = encode $ hmac SHA256.hash 64 key payload
6 changes: 2 additions & 4 deletions mime-mail-ses/mime-mail-ses.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: mime-mail-ses
Version: 0.2.2
Version: 0.2.2.1
Synopsis: Send mime-mail messages via Amazon SES
Homepage: http://github.com/snoyberg/mime-mail
License: MIT
Expand All @@ -13,8 +13,6 @@ Cabal-version: >=1.6
Library
Exposed-modules: Network.Mail.Mime.SES
Build-depends: base >= 4 && < 5
, crypto-api >= 0.6
, cereal >= 0.3
, base64-bytestring >= 0.1
, bytestring >= 0.9
, time >= 1.1
Expand All @@ -24,9 +22,9 @@ Library
, mime-mail >= 0.3
, transformers >= 0.2
, http-types >= 0.6.8
, cryptohash-cryptoapi
, xml-conduit
, xml-types
, text
, conduit
, cryptohash >= 0.7.3
ghc-options: -Wall

0 comments on commit 43bec1f

Please sign in to comment.