From: PHO Date: Sat, 21 Aug 2010 04:54:54 +0000 (+0900) Subject: Bindings.APR.Random X-Git-Tag: RELEASE-0.1~14 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=efb9b0932050f4fb0a7e6d26b5042cade89d06db;p=bindings-apr.git Bindings.APR.Random --- diff --git a/Bindings/APR/Portable.hsc b/Bindings/APR/Portable.hsc index 288b49f..498b17d 100644 --- a/Bindings/APR/Portable.hsc +++ b/Bindings/APR/Portable.hsc @@ -31,7 +31,7 @@ import Bindings.APR.Time #starttype struct apr_os_sock_info_t # field os_sock , Ptr --- FIXME +-- FIXME: sockaddr -- # field local , Ptr -- # field remote , Ptr # field family , CInt diff --git a/Bindings/APR/Random.hsc b/Bindings/APR/Random.hsc new file mode 100644 index 0000000..b20b9fa --- /dev/null +++ b/Bindings/APR/Random.hsc @@ -0,0 +1,29 @@ +#include +#include + +module Bindings.APR.Random where +#strict_import +import Bindings.APR +import Bindings.APR.ErrNo +import Bindings.APR.Pools +import Bindings.APR.Thread.Proc + +#opaque_t apr_crypto_hash_t + +#callback apr_crypto_hash_init_t , Ptr -> IO () +#callback apr_crypto_hash_add_t , Ptr -> Ptr () -> -> IO () +#callback apr_crypto_hash_finish_t, Ptr -> Ptr CUChar -> IO () + +#ccall apr_crypto_sha256_new, Ptr -> IO (Ptr ) + +#opaque_t apr_random_t + +#ccall apr_random_init , Ptr -> Ptr -> Ptr -> Ptr -> Ptr -> IO () +#ccall apr_random_standard_new , Ptr -> IO (Ptr ) +#ccall apr_random_add_entropy , Ptr -> Ptr () -> -> IO () +#ccall apr_random_insecure_bytes, Ptr -> Ptr () -> -> IO +#ccall apr_random_secure_bytes , Ptr -> Ptr () -> -> IO +#ccall apr_random_barrier , Ptr -> IO () +#ccall apr_random_secure_ready , Ptr -> IO +#ccall apr_random_insecure_ready, Ptr -> IO +#ccall apr_random_after_fork , Ptr -> IO () diff --git a/bindings-apr.cabal b/bindings-apr.cabal index 1e573ce..3d77c06 100644 --- a/bindings-apr.cabal +++ b/bindings-apr.cabal @@ -51,6 +51,7 @@ Library Bindings.APR.Pools Bindings.APR.Portable Bindings.APR.Proc.Mutex + Bindings.APR.Random Bindings.APR.Shm Bindings.APR.Tables Bindings.APR.Thread.Mutex