{-# LINE 1 "Bindings/Nettle/Cipher/CAST128.hsc" #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LINE 2 "Bindings/Nettle/Cipher/CAST128.hsc" #-}


{-# LINE 4 "Bindings/Nettle/Cipher/CAST128.hsc" #-}

{-# LINE 5 "Bindings/Nettle/Cipher/CAST128.hsc" #-}

module Bindings.Nettle.Cipher.CAST128 where
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word

{-# LINE 8 "Bindings/Nettle/Cipher/CAST128.hsc" #-}

c'CAST128_BLOCK_SIZE = 8
c'CAST128_BLOCK_SIZE :: (Num a) => a

{-# LINE 10 "Bindings/Nettle/Cipher/CAST128.hsc" #-}
c'CAST128_MIN_KEY_SIZE = 5
c'CAST128_MIN_KEY_SIZE :: (Num a) => a

{-# LINE 11 "Bindings/Nettle/Cipher/CAST128.hsc" #-}
c'CAST128_MAX_KEY_SIZE = 16
c'CAST128_MAX_KEY_SIZE :: (Num a) => a

{-# LINE 12 "Bindings/Nettle/Cipher/CAST128.hsc" #-}
c'CAST128_KEY_SIZE = 16
c'CAST128_KEY_SIZE :: (Num a) => a

{-# LINE 13 "Bindings/Nettle/Cipher/CAST128.hsc" #-}


{-# LINE 15 "Bindings/Nettle/Cipher/CAST128.hsc" #-}
data C'cast128_ctx = C'cast128_ctx{
} deriving (Eq,Show)
instance Storable C'cast128_ctx where
  sizeOf _ = 132
  alignment _ = 4
  peek p = do
    return $ C'cast128_ctx
  poke p (C'cast128_ctx) = do
    return ()

{-# LINE 16 "Bindings/Nettle/Cipher/CAST128.hsc" #-}

foreign import ccall "nettle_cast128_set_key" c'nettle_cast128_set_key
  :: Ptr C'cast128_ctx -> CUInt -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_cast128_set_key" p'nettle_cast128_set_key
  :: FunPtr (Ptr C'cast128_ctx -> CUInt -> Ptr CUChar -> IO ())

{-# LINE 18 "Bindings/Nettle/Cipher/CAST128.hsc" #-}
foreign import ccall "nettle_cast128_encrypt" c'nettle_cast128_encrypt
  :: Ptr C'cast128_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_cast128_encrypt" p'nettle_cast128_encrypt
  :: FunPtr (Ptr C'cast128_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ())

{-# LINE 19 "Bindings/Nettle/Cipher/CAST128.hsc" #-}
foreign import ccall "nettle_cast128_decrypt" c'nettle_cast128_decrypt
  :: Ptr C'cast128_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_cast128_decrypt" p'nettle_cast128_decrypt
  :: FunPtr (Ptr C'cast128_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ())

{-# LINE 20 "Bindings/Nettle/Cipher/CAST128.hsc" #-}