module Bindings.Nettle.Cipher.Camellia 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'CAMELLIA_BLOCK_SIZE = 16
c'CAMELLIA_BLOCK_SIZE :: (Num a) => a
c'CAMELLIA_MIN_KEY_SIZE = 16
c'CAMELLIA_MIN_KEY_SIZE :: (Num a) => a
c'CAMELLIA_MAX_KEY_SIZE = 32
c'CAMELLIA_MAX_KEY_SIZE :: (Num a) => a
c'CAMELLIA_KEY_SIZE = 32
c'CAMELLIA_KEY_SIZE :: (Num a) => a
data C'camellia_ctx = C'camellia_ctx{
} deriving (Eq,Show)
instance Storable C'camellia_ctx where
sizeOf _ = 260
alignment _ = 4
peek p = do
return $ C'camellia_ctx
poke p (C'camellia_ctx) = do
return ()
foreign import ccall "nettle_camellia_set_encrypt_key" c'nettle_camellia_set_encrypt_key
:: Ptr C'camellia_ctx -> CUInt -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_camellia_set_encrypt_key" p'nettle_camellia_set_encrypt_key
:: FunPtr (Ptr C'camellia_ctx -> CUInt -> Ptr CUChar -> IO ())
foreign import ccall "nettle_camellia_set_decrypt_key" c'nettle_camellia_set_decrypt_key
:: Ptr C'camellia_ctx -> CUInt -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_camellia_set_decrypt_key" p'nettle_camellia_set_decrypt_key
:: FunPtr (Ptr C'camellia_ctx -> CUInt -> Ptr CUChar -> IO ())
foreign import ccall "nettle_camellia_invert_key" c'nettle_camellia_invert_key
:: Ptr C'camellia_ctx -> Ptr C'camellia_ctx -> IO ()
foreign import ccall "&nettle_camellia_invert_key" p'nettle_camellia_invert_key
:: FunPtr (Ptr C'camellia_ctx -> Ptr C'camellia_ctx -> IO ())
foreign import ccall "nettle_camellia_crypt" c'nettle_camellia_crypt
:: Ptr C'camellia_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_camellia_crypt" p'nettle_camellia_crypt
:: FunPtr (Ptr C'camellia_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ())