packages feed

bindings-nettle-0.1: Bindings/Nettle/PRNG/Yarrow.hsc

{-# LANGUAGE ForeignFunctionInterface #-}

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

module Bindings.Nettle.PRNG.Yarrow where
#strict_import

#num YARROW256_SEED_FILE_SIZE

#starttype struct yarrow256_ctx
#stoptype

#starttype struct yarrow_source
#stoptype

#ccall yarrow256_init , Ptr <struct yarrow256_ctx> -> CUInt -> Ptr <struct yarrow_source> -> IO ()
#ccall yarrow256_seed , Ptr <struct yarrow256_ctx> -> CUInt -> Ptr CUChar -> IO ()
#ccall yarrow256_update , Ptr <struct yarrow256_ctx> -> CUInt -> CUInt -> CUInt -> Ptr CUChar -> IO CInt
#ccall yarrow256_random , Ptr <struct yarrow256_ctx> -> CUInt -> Ptr CUChar -> IO ()
#ccall yarrow256_is_seeded , Ptr <struct yarrow256_ctx> -> IO CInt
#ccall yarrow256_needed_sources , Ptr <struct yarrow256_ctx> -> IO CUInt
#ccall yarrow256_fast_reseed , Ptr <struct yarrow256_ctx> -> IO ()
#ccall yarrow256_slow_reseed , Ptr <struct yarrow256_ctx> -> IO ()

#starttype struct yarrow_key_event_ctx
#stoptype

#ccall yarrow_key_event_init , Ptr <struct yarrow_key_event_ctx> -> IO ()
#ccall yarrow_key_event_estimate , Ptr <struct yarrow_key_event_ctx> -> CUInt -> CUInt -> IO CUInt