bindings-nettle 0.3.1 → 0.4
raw patch · 3 files changed
+45/−1 lines, 3 files
Files
- Bindings/Nettle/Cipher/ChaCha.hsc +20/−0
- Bindings/Nettle/Cipher/ChaChaPoly1305.hsc +22/−0
- bindings-nettle.cabal +3/−1
+ Bindings/Nettle/Cipher/ChaCha.hsc view
@@ -0,0 +1,20 @@+{-# LANGUAGE ForeignFunctionInterface #-}++#include <bindings.dsl.h>+#include <nettle/chacha.h>++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 <struct chacha_ctx> -> Ptr CUChar -> IO ()+#ccall chacha_set_nonce , Ptr <struct chacha_ctx> -> Ptr CUChar -> IO ()+#ccall chacha_set_nonce96 , Ptr <struct chacha_ctx> -> Ptr CUChar -> IO ()+#ccall chacha_crypt , Ptr <struct chacha_ctx> -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
+ Bindings/Nettle/Cipher/ChaChaPoly1305.hsc view
@@ -0,0 +1,22 @@+{-# LANGUAGE ForeignFunctionInterface #-}++#include <bindings.dsl.h>+#include <nettle/chacha-poly1305.h>++module Bindings.Nettle.Cipher.ChaChaPoly1305 where+#strict_import++#num CHACHA_POLY1305_BLOCK_SIZE+#num CHACHA_POLY1305_KEY_SIZE+#num CHACHA_POLY1305_NONCE_SIZE+#num CHACHA_POLY1305_DIGEST_SIZE++#starttype struct chacha_poly1305_ctx+#stoptype++#ccall chacha_poly1305_set_key , Ptr <struct chacha_poly1305_ctx> -> Ptr CUChar -> IO ()+#ccall chacha_poly1305_set_nonce , Ptr <struct chacha_poly1305_ctx> -> Ptr CUChar -> IO ()+#ccall chacha_poly1305_update , Ptr <struct chacha_poly1305_ctx> -> CUInt -> Ptr CUChar -> IO ()+#ccall chacha_poly1305_encrypt , Ptr <struct chacha_poly1305_ctx> -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()+#ccall chacha_poly1305_decrypt , Ptr <struct chacha_poly1305_ctx> -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()+#ccall chacha_poly1305_digest , Ptr <struct chacha_poly1305_ctx> -> CUInt -> Ptr CUChar -> IO ()
bindings-nettle.cabal view
@@ -1,5 +1,5 @@ name: bindings-nettle-version: 0.3.1+version: 0.4 synopsis: bindings to nettle crypto library description: partial bindings to nettle crypto library homepage: http://floss.scru.org/bindings-nettle@@ -19,6 +19,8 @@ , Bindings.Nettle.Cipher.Blowfish , Bindings.Nettle.Cipher.Camellia , Bindings.Nettle.Cipher.CAST128+ , Bindings.Nettle.Cipher.ChaCha+ , Bindings.Nettle.Cipher.ChaChaPoly1305 , Bindings.Nettle.Cipher.DES , Bindings.Nettle.Cipher.Salsa20 , Bindings.Nettle.Cipher.Serpent