From: PHO Date: Thu, 23 Sep 2010 13:47:39 +0000 (+0900) Subject: Bindings.APR.SHA1 X-Git-Tag: RELEASE-0.1~5 X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=bindings-apr-util.git;a=commitdiff_plain;h=4975306385f041ebb0f22e1abbea5dc445b338af Bindings.APR.SHA1 --- diff --git a/Bindings/APR/SHA1.hsc b/Bindings/APR/SHA1.hsc new file mode 100644 index 0000000..cf9d7cf --- /dev/null +++ b/Bindings/APR/SHA1.hsc @@ -0,0 +1,26 @@ +#include +#include + +module Bindings.APR.SHA1 where +#strict_import +import Bindings.APR + +#num APR_SHA1_DIGESTSIZE + +#globalarray APR_SHA1_ID, CChar + +#num APR_SHA1PW_IDLEN + +#starttype struct apr_sha1_ctx_t +# array_field digest , +# field count_lo, +# field count_hi, +# array_field data , +# field local , CInt +#stoptype + +#ccall apr_sha1_base64 , Ptr CChar -> CInt -> Ptr CChar -> IO () +#ccall apr_sha1_init , Ptr -> IO () +#ccall apr_sha1_update , Ptr -> Ptr CChar -> CUInt -> IO () +#ccall apr_sha1_update_binary, Ptr -> Ptr CUInt -> CUInt -> IO () +#ccall apr_sha1_final , Ptr CUChar -> Ptr -> IO () diff --git a/bindings-apr-util.cabal b/bindings-apr-util.cabal index 052cd4c..9b5aed5 100644 --- a/bindings-apr-util.cabal +++ b/bindings-apr-util.cabal @@ -49,6 +49,7 @@ Library Bindings.APR.RMM Bindings.APR.ResList Bindings.APR.SDBM + Bindings.APR.SHA1 Bindings.APR.XLate C-Sources: @@ -59,6 +60,7 @@ Library cbits/helper_apr_ldap_init.c cbits/helper_apr_md4.c cbits/helper_apr_sdbm.c + cbits/helper_apr_sha1.c Extensions: ForeignFunctionInterface diff --git a/cbits/helper_apr_sha1.c b/cbits/helper_apr_sha1.c new file mode 100644 index 0000000..8fae529 --- /dev/null +++ b/cbits/helper_apr_sha1.c @@ -0,0 +1,4 @@ +#include +#include + +BC_GLOBALARRAY(APR_SHA1PW_ID, char)