module Bindings.Nettle.Cipher.Serpent 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'SERPENT_BLOCK_SIZE = 16
c'SERPENT_BLOCK_SIZE :: (Num a) => a
c'SERPENT_MIN_KEY_SIZE = 16
c'SERPENT_MIN_KEY_SIZE :: (Num a) => a
c'SERPENT_MAX_KEY_SIZE = 32
c'SERPENT_MAX_KEY_SIZE :: (Num a) => a
c'SERPENT_KEY_SIZE = 32
c'SERPENT_KEY_SIZE :: (Num a) => a
data C'serpent_ctx = C'serpent_ctx{
} deriving (Eq,Show)
instance Storable C'serpent_ctx where
sizeOf _ = 528
alignment _ = 4
peek p = do
return $ C'serpent_ctx
poke p (C'serpent_ctx) = do
return ()
foreign import ccall "nettle_serpent_set_key" c'nettle_serpent_set_key
:: Ptr C'serpent_ctx -> CUInt -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_serpent_set_key" p'nettle_serpent_set_key
:: FunPtr (Ptr C'serpent_ctx -> CUInt -> Ptr CUChar -> IO ())
foreign import ccall "nettle_serpent_encrypt" c'nettle_serpent_encrypt
:: Ptr C'serpent_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_serpent_encrypt" p'nettle_serpent_encrypt
:: FunPtr (Ptr C'serpent_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ())
foreign import ccall "nettle_serpent_decrypt" c'nettle_serpent_decrypt
:: Ptr C'serpent_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_serpent_decrypt" p'nettle_serpent_decrypt
:: FunPtr (Ptr C'serpent_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ())