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
c'CAST128_BLOCK_SIZE = 8
c'CAST128_BLOCK_SIZE :: (Num a) => a
c'CAST128_MIN_KEY_SIZE = 5
c'CAST128_MIN_KEY_SIZE :: (Num a) => a
c'CAST128_MAX_KEY_SIZE = 16
c'CAST128_MAX_KEY_SIZE :: (Num a) => a
c'CAST128_KEY_SIZE = 16
c'CAST128_KEY_SIZE :: (Num a) => a
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 ()
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 ())
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 ())
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 ())