fix some warnings

This commit is contained in:
Vincent Hanquez 2015-04-08 22:30:01 +01:00
parent 386e0e170f
commit 842d3fd44a
4 changed files with 8 additions and 5 deletions

View File

@ -21,7 +21,6 @@ import Foreign.C.String
data AES
data AESOCB
data AESGCM
------------------------------------------------------------------------
foreign import ccall "cryptonite_aes.h cryptonite_aes_initkey"
c_aes_init :: Ptr AES -> CString -> CUInt -> IO ()

View File

@ -34,11 +34,10 @@ module Crypto.Cipher.Types.Block
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Internal as B (unsafeCreate)
import Data.Byteable
import Data.Word
import Crypto.Cipher.Types.Base
import Crypto.Cipher.Types.GF
--import Crypto.Cipher.Types.GF
import Crypto.Cipher.Types.Utils
import Crypto.Internal.ByteArray

View File

@ -40,9 +40,14 @@ instance Functor CryptoFailable where
fmap _ (CryptoFailed r) = CryptoFailed r
instance Applicative CryptoFailable where
pure a = CryptoPassed a
pure a = CryptoPassed a
(<*>) fm m = fm >>= \p -> m >>= \r2 -> return (p r2)
instance Monad CryptoFailable where
return a = CryptoPassed a
(>>=) m1 m2 = do
case m1 of
CryptoPassed a -> m2 a
CryptoFailed e -> CryptoFailed e
throwCryptoError :: CryptoFailable a -> IO a
throwCryptoError = undefined

View File

@ -2,7 +2,7 @@
module KAT_Blowfish where
import Crypto.Cipher.Blowfish
import Imports
import Imports ()
import BlockCipher
vectors_ecb = -- key plaintext cipher