fix some warnings
This commit is contained in:
parent
386e0e170f
commit
842d3fd44a
@ -21,7 +21,6 @@ import Foreign.C.String
|
|||||||
data AES
|
data AES
|
||||||
data AESOCB
|
data AESOCB
|
||||||
data AESGCM
|
data AESGCM
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
foreign import ccall "cryptonite_aes.h cryptonite_aes_initkey"
|
foreign import ccall "cryptonite_aes.h cryptonite_aes_initkey"
|
||||||
c_aes_init :: Ptr AES -> CString -> CUInt -> IO ()
|
c_aes_init :: Ptr AES -> CString -> CUInt -> IO ()
|
||||||
|
|||||||
@ -34,11 +34,10 @@ module Crypto.Cipher.Types.Block
|
|||||||
|
|
||||||
import Data.ByteString (ByteString)
|
import Data.ByteString (ByteString)
|
||||||
import qualified Data.ByteString as B
|
import qualified Data.ByteString as B
|
||||||
import qualified Data.ByteString.Internal as B (unsafeCreate)
|
|
||||||
import Data.Byteable
|
import Data.Byteable
|
||||||
import Data.Word
|
import Data.Word
|
||||||
import Crypto.Cipher.Types.Base
|
import Crypto.Cipher.Types.Base
|
||||||
import Crypto.Cipher.Types.GF
|
--import Crypto.Cipher.Types.GF
|
||||||
import Crypto.Cipher.Types.Utils
|
import Crypto.Cipher.Types.Utils
|
||||||
|
|
||||||
import Crypto.Internal.ByteArray
|
import Crypto.Internal.ByteArray
|
||||||
|
|||||||
@ -40,9 +40,14 @@ instance Functor CryptoFailable where
|
|||||||
fmap _ (CryptoFailed r) = CryptoFailed r
|
fmap _ (CryptoFailed r) = CryptoFailed r
|
||||||
|
|
||||||
instance Applicative CryptoFailable where
|
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
|
instance Monad CryptoFailable where
|
||||||
return a = CryptoPassed a
|
return a = CryptoPassed a
|
||||||
|
(>>=) m1 m2 = do
|
||||||
|
case m1 of
|
||||||
|
CryptoPassed a -> m2 a
|
||||||
|
CryptoFailed e -> CryptoFailed e
|
||||||
|
|
||||||
throwCryptoError :: CryptoFailable a -> IO a
|
throwCryptoError :: CryptoFailable a -> IO a
|
||||||
throwCryptoError = undefined
|
throwCryptoError = undefined
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
module KAT_Blowfish where
|
module KAT_Blowfish where
|
||||||
|
|
||||||
import Crypto.Cipher.Blowfish
|
import Crypto.Cipher.Blowfish
|
||||||
import Imports
|
import Imports ()
|
||||||
import BlockCipher
|
import BlockCipher
|
||||||
|
|
||||||
vectors_ecb = -- key plaintext cipher
|
vectors_ecb = -- key plaintext cipher
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user