packages feed

bindings-nettle-0.1: Bindings/Nettle/Cipher/AES.hsc

{-# LANGUAGE ForeignFunctionInterface #-}

#include <bindings.dsl.h>
#include <nettle/aes.h>

module Bindings.Nettle.Cipher.AES where
#strict_import

#num AES_BLOCK_SIZE
#num AES_MIN_KEY_SIZE
#num AES_MAX_KEY_SIZE
#num AES_KEY_SIZE

#starttype struct aes_ctx
#stoptype

#ccall aes_set_encrypt_key , Ptr <struct aes_ctx> -> CUInt -> Ptr CUChar -> IO ()
#ccall aes_set_decrypt_key , Ptr <struct aes_ctx> -> CUInt -> Ptr CUChar -> IO ()
#ccall aes_invert_key , Ptr <struct aes_ctx> -> Ptr <struct aes_ctx> -> IO ()
#ccall aes_encrypt , Ptr <struct aes_ctx> -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
#ccall aes_decrypt , Ptr <struct aes_ctx> -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()