From 6a09ab840ecbcfc53394b102028efacadc0f68f3 Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 28 Jan 2014 00:06:56 -0500 Subject: Fixed wheezy build. --- Crypto/Cipher/ThomasToVincent.hs | 11 +++++++++++ cipher-cast5.cabal | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Crypto/Cipher/ThomasToVincent.hs b/Crypto/Cipher/ThomasToVincent.hs index 85b0875..11cede3 100644 --- a/Crypto/Cipher/ThomasToVincent.hs +++ b/Crypto/Cipher/ThomasToVincent.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} module Crypto.Cipher.ThomasToVincent where @@ -6,6 +7,10 @@ import Data.Byteable import Data.Tagged import qualified Crypto.Classes as Thomas +#if ! MIN_VERSION_crypto_api(0,11,0) +import qualified Crypto.Modes as Thomas +#endif + newtype ThomasToVincent b = ThomasToVincent b @@ -19,6 +24,12 @@ instance Thomas.BlockCipher b => Cipher (ThomasToVincent b) where instance Thomas.BlockCipher b => BlockCipher (ThomasToVincent b) where blockSize _ = bitlen `div` 8 where Tagged bitlen = Thomas.blockSize :: Tagged b Int +#if ! MIN_VERSION_crypto_api(0,11,0) + ecbEncrypt (ThomasToVincent k) = Thomas.ecb' k + ecbDecrypt (ThomasToVincent k) = Thomas.unEcb' k +#else ecbEncrypt (ThomasToVincent k) = Thomas.ecb k ecbDecrypt (ThomasToVincent k) = Thomas.unEcb k +#endif + diff --git a/cipher-cast5.cabal b/cipher-cast5.cabal index fd44ea3..d5f3154 100644 --- a/cipher-cast5.cabal +++ b/cipher-cast5.cabal @@ -18,8 +18,8 @@ library exposed-modules: Crypto.Cipher.Feistel, Crypto.Cipher.Cast5, Crypto.Cipher.SBox, Crypto.Cipher.ThomasToVincent -- other-modules: - build-depends: base >= 4.5, bytestring >=0.9, binary >=0.5.1.1, cpu ==0.1.*, - vector >=0.9, crypto-api ==0.12.*, cereal ==0.3.*, - tagged ==0.6.*, template-haskell >=2.7, + build-depends: base >= 4.5, bytestring >=0.9, binary >=0.5.1.0, cpu ==0.1.*, + vector >=0.9, crypto-api >=0.10.2, cereal ==0.3.*, + tagged >=0.4.2.1, template-haskell >=2.7, ghc-prim >= 0.2, primitive >= 0.4, crypto-cipher-types, byteable -- cgit v1.2.3