{-# LANGUAGE ForeignFunctionInterface #-} #include #include module Bindings.Nettle.Cipher.ChaCha where #strict_import #num CHACHA_KEY_SIZE #num CHACHA_BLOCK_SIZE #num CHACHA_NONCE_SIZE #num CHACHA_NONCE96_SIZE #starttype struct chacha_ctx #stoptype #ccall chacha_set_key , Ptr -> Ptr CUChar -> IO () #ccall chacha_set_nonce , Ptr -> Ptr CUChar -> IO () #ccall chacha_set_nonce96 , Ptr -> Ptr CUChar -> IO () #ccall chacha_crypt , Ptr -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()