crypto-conduit 0.1.1.2 → 0.1.2
raw patch · 2 files changed
+14/−14 lines, 2 filesdep ~conduitPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: conduit
API changes (from Hackage documentation)
Files
- crypto-conduit.cabal +3/−3
- src/Crypto/Conduit.hs +11/−11
crypto-conduit.cabal view
@@ -1,6 +1,6 @@ Cabal-version: >= 1.8 Name: crypto-conduit-Version: 0.1.1.2+Version: 0.1.2 Synopsis: Conduit interface for cryptographic operations (from crypto-api). Homepage: https://github.com/meteficha/crypto-conduit License: BSD3@@ -32,7 +32,7 @@ bytestring >= 0.9 && < 0.10, cereal >= 0.3 && < 0.4, crypto-api >= 0.8 && < 0.9,- conduit >= 0.0 && < 0.2,+ conduit >= 0.2 && < 0.3, transformers == 0.2.* GHC-options: -Wall @@ -43,7 +43,7 @@ bytestring >= 0.9 && < 0.10, cereal >= 0.3 && < 0.4, crypto-api >= 0.8 && < 0.9,- conduit >= 0.0 && < 0.2,+ conduit >= 0.2 && < 0.3, transformers == 0.2.*, cryptocipher == 0.3.*,
src/Crypto/Conduit.hs view
@@ -86,10 +86,10 @@ push ctx (Full bs) = let !ctx' = C.updateCtx ctx bs- in return (ctx', Processing)+ in return (StateProcessing ctx') push ctx (LastOne bs) = let !ret = C.finalize ctx bs- in return (error "sinkHash", Done Nothing ret)+ in return (StateDone Nothing ret) blockSize = (C.blockLength .::. getType sink) `div` 8 @@ -131,11 +131,11 @@ push ctx (Full bs) = let !ctx' = C.updateCtx ctx bs- in return (ctx', Processing)+ in return (StateProcessing ctx') push ctx (LastOne bs) = let !inner = C.finalize ctx bs `asTypeOf` d !outer = C.hash $ L.fromChunks [ko, S.encode inner]- in return (error "sinkHmac", Done Nothing outer)+ in return (StateDone Nothing outer) d = getType sink blockSize = (C.blockLength .::. d) `div` 8@@ -316,7 +316,7 @@ pull iv' = let !iv'' = C.incIV iv' block = C.encryptBlock k $ S.encode iv'- in return (iv'', Open block)+ in return (StateOpen iv'' block) ----------------------------------------------------------------------@@ -337,9 +337,9 @@ push iv (Full input) = let !iv' = C.encryptBlock k (iv `zwp` input)- in return (iv', Processing)+ in return (StateProcessing iv') push iv (LastOne input)- | B.null input = return (error "sinkCbcMac", Done Nothing iv)+ | B.null input = return (StateDone Nothing iv) | otherwise = fail "sinkCbcMac: input has an incomplete final block." close _ = fail "sinkCbcMac"@@ -383,7 +383,7 @@ push acc = return . mk . block . append acc where- mk (blks, rest) = (rest, Producing blks)+ mk (blks, rest) = (StateProducing rest blks) close = return . (:[]) . LastOne @@ -415,11 +415,11 @@ push state (Full input) = let (!state', !output) = apply state input- in return (state', Producing [output])+ in return (StateProducing state' [output]) push _ (LastOne input) | B.null input =- return (error "blockCipherConduit", Finished Nothing [])+ return (StateFinished Nothing []) push state (LastOne input) = mk <$> final state input- where mk output = (error "blockCipherConduit", Finished Nothing [output])+ where mk output = StateFinished Nothing [output] close _ = fail "blockCipherConduit"