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


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

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

module Bindings.Nettle.Cipher.Salsa20 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/Salsa20.hsc" #-}

c'SALSA20_BLOCK_SIZE = 64
c'SALSA20_BLOCK_SIZE :: (Num a) => a

{-# LINE 10 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}
c'SALSA20_MIN_KEY_SIZE = 16
c'SALSA20_MIN_KEY_SIZE :: (Num a) => a

{-# LINE 11 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}
c'SALSA20_MAX_KEY_SIZE = 32
c'SALSA20_MAX_KEY_SIZE :: (Num a) => a

{-# LINE 12 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}
c'SALSA20_KEY_SIZE = 32
c'SALSA20_KEY_SIZE :: (Num a) => a

{-# LINE 13 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}
c'SALSA20_IV_SIZE = 8
c'SALSA20_IV_SIZE :: (Num a) => a

{-# LINE 14 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}


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

{-# LINE 17 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}

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

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

{-# LINE 20 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}
foreign import ccall "nettle_salsa20_crypt" c'nettle_salsa20_crypt
  :: Ptr C'salsa20_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_salsa20_crypt" p'nettle_salsa20_crypt
  :: FunPtr (Ptr C'salsa20_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ())

{-# LINE 21 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}
foreign import ccall "nettle_salsa20r12_crypt" c'nettle_salsa20r12_crypt
  :: Ptr C'salsa20_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
foreign import ccall "&nettle_salsa20r12_crypt" p'nettle_salsa20r12_crypt
  :: FunPtr (Ptr C'salsa20_ctx -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ())

{-# LINE 22 "Bindings/Nettle/Cipher/Salsa20.hsc" #-}