-- GENERATED by C->Haskell Compiler, version 0.28.6 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "hs/Libsodium.chs" #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wno-missing-signatures #-}



-- | This module exports raw bindings to the @libsodium@ C library.
--
-- You can find @libsodium@'s documentation at
-- https://libsodium.gitbook.io
--
-- Regarding the version of the C @libsodium@ library supported by this
-- library: Haskell's library @libsodium-A.B.C.D@ is designed to work
-- with the C library @libsodium-A.B.C@.
module Libsodium {--}
  ( -- * Functions
    --
    -- $functions
    (:::)
  , crypto_aead_aes256gcm_beforenm
  , crypto_aead_aes256gcm_decrypt
  , crypto_aead_aes256gcm_decrypt_afternm
  , crypto_aead_aes256gcm_decrypt_detached
  , crypto_aead_aes256gcm_decrypt_detached_afternm
  , crypto_aead_aes256gcm_encrypt
  , crypto_aead_aes256gcm_encrypt_afternm
  , crypto_aead_aes256gcm_encrypt_detached
  , crypto_aead_aes256gcm_encrypt_detached_afternm
  , crypto_aead_aes256gcm_is_available
  , crypto_aead_aes256gcm_keygen
  , crypto_aead_chacha20poly1305_decrypt
  , crypto_aead_chacha20poly1305_decrypt_detached
  , crypto_aead_chacha20poly1305_encrypt
  , crypto_aead_chacha20poly1305_encrypt_detached
  , crypto_aead_chacha20poly1305_ietf_decrypt
  , crypto_aead_chacha20poly1305_ietf_decrypt_detached
  , crypto_aead_chacha20poly1305_ietf_encrypt
  , crypto_aead_chacha20poly1305_ietf_encrypt_detached
  , crypto_aead_chacha20poly1305_ietf_keygen
  , crypto_aead_chacha20poly1305_keygen
  , crypto_aead_xchacha20poly1305_ietf_decrypt
  , crypto_aead_xchacha20poly1305_ietf_decrypt_detached
  , crypto_aead_xchacha20poly1305_ietf_encrypt
  , crypto_aead_xchacha20poly1305_ietf_encrypt_detached
  , crypto_aead_xchacha20poly1305_ietf_keygen
  , crypto_auth
  , crypto_auth_hmacsha256
  , crypto_auth_hmacsha256_final
  , crypto_auth_hmacsha256_init
  , crypto_auth_hmacsha256_keygen
  , crypto_auth_hmacsha256_update
  , crypto_auth_hmacsha256_verify
  , crypto_auth_hmacsha512
  , crypto_auth_hmacsha512256
  , crypto_auth_hmacsha512256_final
  , crypto_auth_hmacsha512256_init
  , crypto_auth_hmacsha512256_keygen
  , crypto_auth_hmacsha512256_update
  , crypto_auth_hmacsha512256_verify
  , crypto_auth_hmacsha512_final
  , crypto_auth_hmacsha512_init
  , crypto_auth_hmacsha512_keygen
  , crypto_auth_hmacsha512_update
  , crypto_auth_hmacsha512_verify
  , crypto_auth_keygen
  , crypto_auth_verify
  , crypto_box
  , crypto_box_afternm
  , crypto_box_beforenm
  , crypto_box_curve25519xchacha20poly1305_beforenm
  , crypto_box_curve25519xchacha20poly1305_detached
  , crypto_box_curve25519xchacha20poly1305_detached_afternm
  , crypto_box_curve25519xchacha20poly1305_easy
  , crypto_box_curve25519xchacha20poly1305_easy_afternm
  , crypto_box_curve25519xchacha20poly1305_keypair
  , crypto_box_curve25519xchacha20poly1305_open_detached
  , crypto_box_curve25519xchacha20poly1305_open_detached_afternm
  , crypto_box_curve25519xchacha20poly1305_open_easy
  , crypto_box_curve25519xchacha20poly1305_open_easy_afternm
  , crypto_box_curve25519xchacha20poly1305_seal
  , crypto_box_curve25519xchacha20poly1305_seal_open
  , crypto_box_curve25519xchacha20poly1305_seed_keypair
  , crypto_box_curve25519xsalsa20poly1305
  , crypto_box_curve25519xsalsa20poly1305_afternm
  , crypto_box_curve25519xsalsa20poly1305_beforenm
  , crypto_box_curve25519xsalsa20poly1305_keypair
  , crypto_box_curve25519xsalsa20poly1305_open
  , crypto_box_curve25519xsalsa20poly1305_open_afternm
  , crypto_box_curve25519xsalsa20poly1305_seed_keypair
  , crypto_box_detached
  , crypto_box_detached_afternm
  , crypto_box_easy
  , crypto_box_easy_afternm
  , crypto_box_keypair
  , crypto_box_open
  , crypto_box_open_afternm
  , crypto_box_open_detached
  , crypto_box_open_detached_afternm
  , crypto_box_open_easy
  , crypto_box_open_easy_afternm
  , crypto_box_seal
  , crypto_box_seal_open
  , crypto_box_seed_keypair
  , crypto_core_ed25519_add
  , crypto_core_ed25519_from_hash
  , crypto_core_ed25519_from_uniform
  , crypto_core_ed25519_is_valid_point
  , crypto_core_ed25519_random
  , crypto_core_ed25519_scalar_add
  , crypto_core_ed25519_scalar_complement
  , crypto_core_ed25519_scalar_invert
  , crypto_core_ed25519_scalar_mul
  , crypto_core_ed25519_scalar_negate
  , crypto_core_ed25519_scalar_random
  , crypto_core_ed25519_scalar_reduce
  , crypto_core_ed25519_scalar_sub
  , crypto_core_ed25519_sub
  , crypto_core_hchacha20
  , crypto_core_hsalsa20
  , crypto_core_ristretto255_add
  , crypto_core_ristretto255_from_hash
  , crypto_core_ristretto255_is_valid_point
  , crypto_core_ristretto255_random
  , crypto_core_ristretto255_scalar_add
  , crypto_core_ristretto255_scalar_complement
  , crypto_core_ristretto255_scalar_invert
  , crypto_core_ristretto255_scalar_mul
  , crypto_core_ristretto255_scalar_negate
  , crypto_core_ristretto255_scalar_random
  , crypto_core_ristretto255_scalar_reduce
  , crypto_core_ristretto255_scalar_sub
  , crypto_core_ristretto255_sub
  , crypto_core_salsa20
  , crypto_core_salsa2012
  , crypto_core_salsa208
  , crypto_generichash
  , crypto_generichash_blake2b
  , crypto_generichash_blake2b_final
  , crypto_generichash_blake2b_init
  , crypto_generichash_blake2b_init_salt_personal
  , crypto_generichash_blake2b_keygen
  , crypto_generichash_blake2b_salt_personal
  , crypto_generichash_blake2b_update
  , crypto_generichash_final
  , crypto_generichash_init
  , crypto_generichash_keygen
  , crypto_generichash_update
  , crypto_hash
  , crypto_hash_sha256
  , crypto_hash_sha256_final
  , crypto_hash_sha256_init
  , crypto_hash_sha256_update
  , crypto_hash_sha512
  , crypto_hash_sha512_final
  , crypto_hash_sha512_init
  , crypto_hash_sha512_update
  , crypto_kdf_blake2b_derive_from_key
  , crypto_kdf_derive_from_key
  , crypto_kdf_keygen
  , crypto_kx_client_session_keys
  , crypto_kx_keypair
  , crypto_kx_seed_keypair
  , crypto_kx_server_session_keys
  , crypto_onetimeauth
  , crypto_onetimeauth_final
  , crypto_onetimeauth_init
  , crypto_onetimeauth_keygen
  , crypto_onetimeauth_poly1305
  , crypto_onetimeauth_poly1305_final
  , crypto_onetimeauth_poly1305_init
  , crypto_onetimeauth_poly1305_keygen
  , crypto_onetimeauth_poly1305_update
  , crypto_onetimeauth_poly1305_verify
  , crypto_onetimeauth_update
  , crypto_onetimeauth_verify
  , crypto_pwhash
  , crypto_pwhash_argon2i
  , crypto_pwhash_argon2id
  , crypto_pwhash_argon2id_str
  , crypto_pwhash_argon2id_str_needs_rehash
  , crypto_pwhash_argon2id_str_verify
  , crypto_pwhash_argon2i_str
  , crypto_pwhash_argon2i_str_needs_rehash
  , crypto_pwhash_argon2i_str_verify
  , crypto_pwhash_scryptsalsa208sha256
  , crypto_pwhash_scryptsalsa208sha256_ll
  , crypto_pwhash_scryptsalsa208sha256_str
  , crypto_pwhash_scryptsalsa208sha256_str_needs_rehash
  , crypto_pwhash_scryptsalsa208sha256_str_verify
  , crypto_pwhash_str
  , crypto_pwhash_str_alg
  , crypto_pwhash_str_needs_rehash
  , crypto_pwhash_str_verify
  , crypto_scalarmult
  , crypto_scalarmult_base
  , crypto_scalarmult_curve25519
  , crypto_scalarmult_curve25519_base
  , crypto_scalarmult_ed25519
  , crypto_scalarmult_ed25519_base
  , crypto_scalarmult_ed25519_base_noclamp
  , crypto_scalarmult_ed25519_noclamp
  , crypto_scalarmult_ristretto255
  , crypto_scalarmult_ristretto255_base
  , crypto_secretbox
  , crypto_secretbox_detached
  , crypto_secretbox_easy
  , crypto_secretbox_keygen
  , crypto_secretbox_open
  , crypto_secretbox_open_detached
  , crypto_secretbox_open_easy
  , crypto_secretbox_xchacha20poly1305_detached
  , crypto_secretbox_xchacha20poly1305_easy
  , crypto_secretbox_xchacha20poly1305_open_detached
  , crypto_secretbox_xchacha20poly1305_open_easy
  , crypto_secretbox_xsalsa20poly1305
  , crypto_secretbox_xsalsa20poly1305_keygen
  , crypto_secretbox_xsalsa20poly1305_open
  , crypto_secretstream_xchacha20poly1305_init_pull
  , crypto_secretstream_xchacha20poly1305_init_push
  , crypto_secretstream_xchacha20poly1305_keygen
  , crypto_secretstream_xchacha20poly1305_pull
  , crypto_secretstream_xchacha20poly1305_push
  , crypto_secretstream_xchacha20poly1305_rekey
  , crypto_shorthash
  , crypto_shorthash_keygen
  , crypto_shorthash_siphash24
  , crypto_shorthash_siphashx24
  , crypto_sign
  , crypto_sign_detached
  , crypto_sign_ed25519
  , crypto_sign_ed25519_detached
  , crypto_sign_ed25519_keypair
  , crypto_sign_ed25519_open
  , crypto_sign_ed25519ph_final_create
  , crypto_sign_ed25519ph_final_verify
  , crypto_sign_ed25519ph_init
  , crypto_sign_ed25519ph_update
  , crypto_sign_ed25519_pk_to_curve25519
  , crypto_sign_ed25519_seed_keypair
  , crypto_sign_ed25519_sk_to_curve25519
  , crypto_sign_ed25519_sk_to_pk
  , crypto_sign_ed25519_sk_to_seed
  , crypto_sign_ed25519_verify_detached
  , crypto_sign_final_create
  , crypto_sign_final_verify
  , crypto_sign_init
  , crypto_sign_keypair
  , crypto_sign_open
  , crypto_sign_seed_keypair
  , crypto_sign_update
  , crypto_sign_verify_detached
  , crypto_stream
  , crypto_stream_chacha20
  , crypto_stream_chacha20_ietf
  , crypto_stream_chacha20_ietf_keygen
  , crypto_stream_chacha20_ietf_xor
  , crypto_stream_chacha20_ietf_xor_ic
  , crypto_stream_chacha20_keygen
  , crypto_stream_chacha20_xor
  , crypto_stream_chacha20_xor_ic
  , crypto_stream_keygen
  , crypto_stream_salsa20
  , crypto_stream_salsa2012
  , crypto_stream_salsa2012_keygen
  , crypto_stream_salsa2012_xor
  , crypto_stream_salsa208
  , crypto_stream_salsa208_keygen
  , crypto_stream_salsa208_xor
  , crypto_stream_salsa20_keygen
  , crypto_stream_salsa20_xor
  , crypto_stream_salsa20_xor_ic
  , crypto_stream_xchacha20
  , crypto_stream_xchacha20_keygen
  , crypto_stream_xchacha20_xor
  , crypto_stream_xchacha20_xor_ic
  , crypto_stream_xor
  , crypto_stream_xsalsa20
  , crypto_stream_xsalsa20_keygen
  , crypto_stream_xsalsa20_xor
  , crypto_stream_xsalsa20_xor_ic
  , crypto_verify_16
  , crypto_verify_32
  , crypto_verify_64
  , randombytes
  , randombytes_buf
  , randombytes_buf_deterministic
  , randombytes_close
  , randombytes_implementation_name
  , randombytes_internal_implementation
  , randombytes_random
  , randombytes_set_implementation
  , randombytes_stir
  , randombytes_sysrandom_implementation
  , randombytes_uniform
  , sodium_add
  , sodium_allocarray
  , sodium_base642bin
  , sodium_base64_encoded_len
  , sodium_bin2base64
  , sodium_bin2hex
  , sodium_compare
  , sodium_free
  , sodium_hex2bin
  , sodium_increment
  , sodium_init
  , sodium_is_zero
  , sodium_malloc
  , sodium_memcmp
  , sodium_memzero
  , sodium_mlock
  , sodium_mprotect_noaccess
  , sodium_mprotect_readonly
  , sodium_mprotect_readwrite
  , sodium_munlock
  , sodium_pad
  , sodium_runtime_has_aesni
  , sodium_runtime_has_avx
  , sodium_runtime_has_avx2
  , sodium_runtime_has_avx512f
  , sodium_runtime_has_neon
  , sodium_runtime_has_pclmul
  , sodium_runtime_has_rdrand
  , sodium_runtime_has_sse2
  , sodium_runtime_has_sse3
  , sodium_runtime_has_sse41
  , sodium_runtime_has_ssse3
  , sodium_stackzero
  , sodium_sub
  , sodium_unpad
    -- * Types
    --
    -- $types
  , Crypto_aead_aes256gcm_state(..)
  , crypto_aead_aes256gcm_state'ptr
  , crypto_aead_aes256gcm_state'malloc
  , Crypto_auth_hmacsha256_state(..)
  , crypto_auth_hmacsha256_state'ptr
  , crypto_auth_hmacsha256_state'malloc
  , Crypto_auth_hmacsha512256_state
  , crypto_auth_hmacsha512256_state'ptr
  , crypto_auth_hmacsha512256_state'malloc
  , Crypto_auth_hmacsha512_state(..)
  , crypto_auth_hmacsha512_state'ptr
  , crypto_auth_hmacsha512_state'malloc
  , Crypto_generichash_blake2b_state(..)
  , crypto_generichash_blake2b_state'ptr
  , crypto_generichash_blake2b_state'malloc
  , Crypto_generichash_state
  , crypto_generichash_state'ptr
  , crypto_generichash_state'malloc
  , Crypto_hash_sha256_state(..)
  , crypto_hash_sha256_state'ptr
  , crypto_hash_sha256_state'malloc
  , Crypto_hash_sha512_state(..)
  , crypto_hash_sha512_state'ptr
  , crypto_hash_sha512_state'malloc
  , Crypto_onetimeauth_poly1305_state(..)
  , crypto_onetimeauth_poly1305_state'ptr
  , crypto_onetimeauth_poly1305_state'malloc
  , Crypto_onetimeauth_state
  , crypto_onetimeauth_state'ptr
  , crypto_onetimeauth_state'malloc
  , Crypto_secretstream_xchacha20poly1305_state(..)
  , crypto_secretstream_xchacha20poly1305_state'ptr
  , crypto_secretstream_xchacha20poly1305_state'malloc
  , Crypto_sign_ed25519ph_state(..)
  , crypto_sign_ed25519ph_state'ptr
  , crypto_sign_ed25519ph_state'malloc
  , Crypto_sign_state
  , crypto_sign_state'ptr
  , crypto_sign_state'malloc
  , Randombytes_implementation(..)
  , randombytes_implementation'ptr
  , randombytes_implementation'malloc
  -- * Constants
  --
  -- $constants
  , module Libsodium.Constants
  -- * Extras
  , sodium_memzero'finalizerEnv
  , sodium_memzero'finalizerEnvFree
  ) --}
  where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp



import Data.Coerce
import Data.Word
import Foreign.C
import Foreign.ForeignPtr
import Foreign.Marshal.Array (copyArray)
import Foreign.Ptr
import Foreign.Storable
import Libsodium.Constants

-------------------------------------------------------------------------


{-# LINE 403 "hs/Libsodium.chs" #-}


{-# LINE 404 "hs/Libsodium.chs" #-}


{-# LINE 405 "hs/Libsodium.chs" #-}



{-# LINE 407 "hs/Libsodium.chs" #-}


{-# LINE 408 "hs/Libsodium.chs" #-}


{-# LINE 409 "hs/Libsodium.chs" #-}



{-# LINE 411 "hs/Libsodium.chs" #-}


{-# LINE 412 "hs/Libsodium.chs" #-}


{-# LINE 413 "hs/Libsodium.chs" #-}



{-# LINE 415 "hs/Libsodium.chs" #-}


{-# LINE 416 "hs/Libsodium.chs" #-}


{-# LINE 417 "hs/Libsodium.chs" #-}



{-# LINE 419 "hs/Libsodium.chs" #-}


{-# LINE 420 "hs/Libsodium.chs" #-}


{-# LINE 421 "hs/Libsodium.chs" #-}



{-# LINE 423 "hs/Libsodium.chs" #-}


{-# LINE 424 "hs/Libsodium.chs" #-}


{-# LINE 425 "hs/Libsodium.chs" #-}



{-# LINE 427 "hs/Libsodium.chs" #-}


{-# LINE 428 "hs/Libsodium.chs" #-}


{-# LINE 429 "hs/Libsodium.chs" #-}



{-# LINE 431 "hs/Libsodium.chs" #-}


{-# LINE 432 "hs/Libsodium.chs" #-}


{-# LINE 433 "hs/Libsodium.chs" #-}



{-# LINE 435 "hs/Libsodium.chs" #-}


{-# LINE 436 "hs/Libsodium.chs" #-}


{-# LINE 437 "hs/Libsodium.chs" #-}


-------------------------------------------------------------------------
-- $functions
--
-- In "Libsodium", each function parameter shows up as “@name ':::' x@”,
-- where @x@ is the actual parameter type and @name@ is the name the
-- parameter is given in the C library.
--
-- This is for documentation purposes only. The type checker will
-- ignore the “@name :::@” part.

-- | “@name ::: x@” is a type synonym for @x@.
type name ::: x = x

-------------------------------------------------------------------------

crypto_aead_aes256gcm_beforenm :: (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_beforenm :: forall {k} {k} (ctx_ :: k) (k :: k).
(ctx_ ::: Ptr Crypto_aead_aes256gcm_state)
-> (k ::: Ptr CUChar) -> IO CInt
crypto_aead_aes256gcm_beforenm ctx_ ::: Ptr Crypto_aead_aes256gcm_state
a1 k ::: Ptr CUChar
a2 =
  let {a1' :: Ptr b
a1' = forall a b. Ptr a -> Ptr b
castPtr ctx_ ::: Ptr Crypto_aead_aes256gcm_state
a1} in 
  let {a2' :: k ::: Ptr CUChar
a2' = forall a. a -> a
id k ::: Ptr CUChar
a2} in 
  Ptr () -> (k ::: Ptr CUChar) -> IO CInt
crypto_aead_aes256gcm_beforenm'_ forall {b}. Ptr b
a1' k ::: Ptr CUChar
a2' forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CInt
res ->
  let {res' :: CInt
res' = forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
res} in
  forall (m :: * -> *) a. Monad m => a -> m a
return (CInt
res')

{-# LINE 454 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_decrypt_afternm :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO ((CInt))
crypto_aead_aes256gcm_decrypt_afternm a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = castPtr a9} in 
  crypto_aead_aes256gcm_decrypt_afternm'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 455 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_decrypt_detached_afternm :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO ((CInt))
crypto_aead_aes256gcm_decrypt_detached_afternm a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = castPtr a9} in 
  crypto_aead_aes256gcm_decrypt_detached_afternm'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 456 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_decrypt_detached :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_decrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_aes256gcm_decrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 457 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_decrypt :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_decrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_aes256gcm_decrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 458 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_encrypt_afternm :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO ((CInt))
crypto_aead_aes256gcm_encrypt_afternm a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = castPtr a9} in 
  crypto_aead_aes256gcm_encrypt_afternm'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 459 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_encrypt_detached_afternm :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO ((CInt))
crypto_aead_aes256gcm_encrypt_detached_afternm a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  let {a10' = castPtr a10} in 
  crypto_aead_aes256gcm_encrypt_detached_afternm'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 460 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_encrypt_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_encrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  let {a10' = id a10} in 
  crypto_aead_aes256gcm_encrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 461 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_encrypt :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_aes256gcm_encrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_aes256gcm_encrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 462 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_is_available :: IO ((CInt))
crypto_aead_aes256gcm_is_available =
  crypto_aead_aes256gcm_is_available'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 463 "hs/Libsodium.chs" #-}

crypto_aead_aes256gcm_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_aead_aes256gcm_keygen a1 =
  let {a1' = id a1} in 
  crypto_aead_aes256gcm_keygen'_ a1' >>
  return ()

{-# LINE 464 "hs/Libsodium.chs" #-}


crypto_aead_chacha20poly1305_decrypt_detached :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_decrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_chacha20poly1305_decrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 466 "hs/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_decrypt :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_decrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_chacha20poly1305_decrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 467 "hs/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_encrypt_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_encrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  let {a10' = id a10} in 
  crypto_aead_chacha20poly1305_encrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 468 "hs/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_encrypt :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_encrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_chacha20poly1305_encrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 469 "hs/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_aead_chacha20poly1305_keygen a1 =
  let {a1' = id a1} in 
  crypto_aead_chacha20poly1305_keygen'_ a1' >>
  return ()

{-# LINE 470 "hs/Libsodium.chs" #-}


crypto_aead_chacha20poly1305_ietf_decrypt_detached :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_ietf_decrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_chacha20poly1305_ietf_decrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 472 "hs/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_ietf_decrypt :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_ietf_decrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_chacha20poly1305_ietf_decrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 473 "hs/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_ietf_encrypt_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_ietf_encrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  let {a10' = id a10} in 
  crypto_aead_chacha20poly1305_ietf_encrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 474 "hs/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_ietf_encrypt :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_chacha20poly1305_ietf_encrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_chacha20poly1305_ietf_encrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 475 "hs/Libsodium.chs" #-}

crypto_aead_chacha20poly1305_ietf_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_aead_chacha20poly1305_ietf_keygen a1 =
  let {a1' = id a1} in 
  crypto_aead_chacha20poly1305_ietf_keygen'_ a1' >>
  return ()

{-# LINE 476 "hs/Libsodium.chs" #-}


crypto_aead_xchacha20poly1305_ietf_decrypt_detached :: (m ::: Ptr CUChar) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (mac ::: Ptr CUChar) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_xchacha20poly1305_ietf_decrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_xchacha20poly1305_ietf_decrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 478 "hs/Libsodium.chs" #-}

crypto_aead_xchacha20poly1305_ietf_decrypt :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (nsec ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_xchacha20poly1305_ietf_decrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_xchacha20poly1305_ietf_decrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 479 "hs/Libsodium.chs" #-}

crypto_aead_xchacha20poly1305_ietf_encrypt_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (maclen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_xchacha20poly1305_ietf_encrypt_detached a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  let {a10' = id a10} in 
  crypto_aead_xchacha20poly1305_ietf_encrypt_detached'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 480 "hs/Libsodium.chs" #-}

crypto_aead_xchacha20poly1305_ietf_encrypt :: (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (nsec ::: Ptr CUChar) -> (npub ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_aead_xchacha20poly1305_ietf_encrypt a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_aead_xchacha20poly1305_ietf_encrypt'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 481 "hs/Libsodium.chs" #-}

crypto_aead_xchacha20poly1305_ietf_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_aead_xchacha20poly1305_ietf_keygen a1 =
  let {a1' = id a1} in 
  crypto_aead_xchacha20poly1305_ietf_keygen'_ a1' >>
  return ()

{-# LINE 482 "hs/Libsodium.chs" #-}


crypto_auth_hmacsha256_final :: (state ::: Ptr Crypto_auth_hmacsha256_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha256_final a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_auth_hmacsha256_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 484 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha256_init :: (state ::: Ptr Crypto_auth_hmacsha256_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_auth_hmacsha256_init a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_auth_hmacsha256_init'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 485 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha256_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_auth_hmacsha256_keygen a1 =
  let {a1' = id a1} in 
  crypto_auth_hmacsha256_keygen'_ a1' >>
  return ()

{-# LINE 486 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha256 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha256 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_auth_hmacsha256'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 487 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha256_update :: (state ::: Ptr Crypto_auth_hmacsha256_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_auth_hmacsha256_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_auth_hmacsha256_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 488 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha256_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha256_verify a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_auth_hmacsha256_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 489 "hs/Libsodium.chs" #-}


crypto_auth_hmacsha512256_final :: (state ::: Ptr Crypto_auth_hmacsha512256_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512256_final a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_auth_hmacsha512256_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 491 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512256_init :: (state ::: Ptr Crypto_auth_hmacsha512256_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_auth_hmacsha512256_init a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_auth_hmacsha512256_init'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 492 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512256_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_auth_hmacsha512256_keygen a1 =
  let {a1' = id a1} in 
  crypto_auth_hmacsha512256_keygen'_ a1' >>
  return ()

{-# LINE 493 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512256 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512256 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_auth_hmacsha512256'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 494 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512256_update :: (state ::: Ptr Crypto_auth_hmacsha512256_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_auth_hmacsha512256_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_auth_hmacsha512256_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 495 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512256_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512256_verify a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_auth_hmacsha512256_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 496 "hs/Libsodium.chs" #-}


crypto_auth_hmacsha512_final :: (state ::: Ptr Crypto_auth_hmacsha512_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512_final a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_auth_hmacsha512_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 498 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512_init :: (state ::: Ptr Crypto_auth_hmacsha512_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_auth_hmacsha512_init a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_auth_hmacsha512_init'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 499 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_auth_hmacsha512_keygen a1 =
  let {a1' = id a1} in 
  crypto_auth_hmacsha512_keygen'_ a1' >>
  return ()

{-# LINE 500 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_auth_hmacsha512'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 501 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512_update :: (state ::: Ptr Crypto_auth_hmacsha512_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_auth_hmacsha512_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_auth_hmacsha512_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 502 "hs/Libsodium.chs" #-}

crypto_auth_hmacsha512_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_hmacsha512_verify a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_auth_hmacsha512_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 503 "hs/Libsodium.chs" #-}


crypto_auth_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_auth_keygen a1 =
  let {a1' = id a1} in 
  crypto_auth_keygen'_ a1' >>
  return ()

{-# LINE 505 "hs/Libsodium.chs" #-}

crypto_auth :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_auth'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 506 "hs/Libsodium.chs" #-}

crypto_auth_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_auth_verify a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_auth_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 507 "hs/Libsodium.chs" #-}


crypto_box_detached_afternm :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_detached_afternm a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_detached_afternm'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 509 "hs/Libsodium.chs" #-}

crypto_box_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_detached a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  crypto_box_detached'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 510 "hs/Libsodium.chs" #-}

crypto_box_easy_afternm :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_easy_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_easy_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 511 "hs/Libsodium.chs" #-}

crypto_box_easy :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_easy a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_easy'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 512 "hs/Libsodium.chs" #-}

crypto_box_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_keypair a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_box_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 513 "hs/Libsodium.chs" #-}

crypto_box_open_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_open_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 514 "hs/Libsodium.chs" #-}

crypto_box_open_detached_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_detached_afternm a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_open_detached_afternm'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 515 "hs/Libsodium.chs" #-}

crypto_box_open_detached :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_detached a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  crypto_box_open_detached'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 516 "hs/Libsodium.chs" #-}

crypto_box_open_easy_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_easy_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_open_easy_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 517 "hs/Libsodium.chs" #-}

crypto_box_open_easy :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open_easy a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_open_easy'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 518 "hs/Libsodium.chs" #-}

crypto_box_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_open a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_open'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 519 "hs/Libsodium.chs" #-}

crypto_box :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 520 "hs/Libsodium.chs" #-}

crypto_box_seal_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_seal_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_seal_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 521 "hs/Libsodium.chs" #-}

crypto_box_seal :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_seal a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_box_seal'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 522 "hs/Libsodium.chs" #-}

crypto_box_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_box_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_box_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 523 "hs/Libsodium.chs" #-}

crypto_box_afternm :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 524 "hs/Libsodium.chs" #-}

crypto_box_beforenm :: (k ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_beforenm a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_box_beforenm'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 525 "hs/Libsodium.chs" #-}


crypto_box_curve25519xchacha20poly1305_beforenm :: (k ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_beforenm a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_box_curve25519xchacha20poly1305_beforenm'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 527 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_detached_afternm :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_detached_afternm a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_curve25519xchacha20poly1305_detached_afternm'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 528 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_detached a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  crypto_box_curve25519xchacha20poly1305_detached'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 529 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_easy_afternm :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_easy_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_curve25519xchacha20poly1305_easy_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 530 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_easy :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_easy a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_curve25519xchacha20poly1305_easy'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 531 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_keypair a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_box_curve25519xchacha20poly1305_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 532 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_open_detached_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_open_detached_afternm a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_curve25519xchacha20poly1305_open_detached_afternm'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 533 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_open_detached :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_open_detached a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  crypto_box_curve25519xchacha20poly1305_open_detached'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 534 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_open_easy_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_open_easy_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_curve25519xchacha20poly1305_open_easy_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 535 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_open_easy :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_open_easy a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_curve25519xchacha20poly1305_open_easy'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 536 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_seal_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_seal_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_curve25519xchacha20poly1305_seal_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 537 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_seal :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_seal a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_box_curve25519xchacha20poly1305_seal'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 538 "hs/Libsodium.chs" #-}

crypto_box_curve25519xchacha20poly1305_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xchacha20poly1305_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_box_curve25519xchacha20poly1305_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 539 "hs/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_afternm :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_curve25519xsalsa20poly1305_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 540 "hs/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_beforenm :: (k ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_beforenm a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_box_curve25519xsalsa20poly1305_beforenm'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 541 "hs/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_keypair a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_box_curve25519xsalsa20poly1305_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 542 "hs/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_open_afternm :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_open_afternm a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_box_curve25519xsalsa20poly1305_open_afternm'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 543 "hs/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_open a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_curve25519xsalsa20poly1305_open'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 544 "hs/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305 :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305 a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_box_curve25519xsalsa20poly1305'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 545 "hs/Libsodium.chs" #-}

crypto_box_curve25519xsalsa20poly1305_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_box_curve25519xsalsa20poly1305_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_box_curve25519xsalsa20poly1305_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 546 "hs/Libsodium.chs" #-}


crypto_core_ed25519_add :: (r ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> (q ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_add a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ed25519_add'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 548 "hs/Libsodium.chs" #-}

crypto_core_ed25519_from_hash :: (p ::: Ptr CUChar) -> (h ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_from_hash a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ed25519_from_hash'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 549 "hs/Libsodium.chs" #-}

crypto_core_ed25519_from_uniform :: (p ::: Ptr CUChar) -> (r ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_from_uniform a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ed25519_from_uniform'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 550 "hs/Libsodium.chs" #-}

crypto_core_ed25519_is_valid_point :: (p ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_is_valid_point a1 =
  let {a1' = id a1} in 
  crypto_core_ed25519_is_valid_point'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 551 "hs/Libsodium.chs" #-}

crypto_core_ed25519_random :: (p ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_random a1 =
  let {a1' = id a1} in 
  crypto_core_ed25519_random'_ a1' >>
  return ()

{-# LINE 552 "hs/Libsodium.chs" #-}

crypto_core_ed25519_scalar_add :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_add a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ed25519_scalar_add'_ a1' a2' a3' >>
  return ()

{-# LINE 553 "hs/Libsodium.chs" #-}

crypto_core_ed25519_scalar_complement :: (comp ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_complement a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ed25519_scalar_complement'_ a1' a2' >>
  return ()

{-# LINE 554 "hs/Libsodium.chs" #-}

crypto_core_ed25519_scalar_invert :: (recip ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_scalar_invert a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ed25519_scalar_invert'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 555 "hs/Libsodium.chs" #-}

crypto_core_ed25519_scalar_mul :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_mul a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ed25519_scalar_mul'_ a1' a2' a3' >>
  return ()

{-# LINE 556 "hs/Libsodium.chs" #-}

crypto_core_ed25519_scalar_negate :: (neg ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_negate a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ed25519_scalar_negate'_ a1' a2' >>
  return ()

{-# LINE 557 "hs/Libsodium.chs" #-}

crypto_core_ed25519_scalar_random :: (r ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_random a1 =
  let {a1' = id a1} in 
  crypto_core_ed25519_scalar_random'_ a1' >>
  return ()

{-# LINE 558 "hs/Libsodium.chs" #-}

crypto_core_ed25519_scalar_reduce :: (r ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_reduce a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ed25519_scalar_reduce'_ a1' a2' >>
  return ()

{-# LINE 559 "hs/Libsodium.chs" #-}

crypto_core_ed25519_scalar_sub :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ed25519_scalar_sub a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ed25519_scalar_sub'_ a1' a2' a3' >>
  return ()

{-# LINE 560 "hs/Libsodium.chs" #-}

crypto_core_ed25519_sub :: (r ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> (q ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ed25519_sub a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ed25519_sub'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 561 "hs/Libsodium.chs" #-}


crypto_core_hchacha20 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_hchacha20 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_core_hchacha20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 563 "hs/Libsodium.chs" #-}


crypto_core_hsalsa20 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_hsalsa20 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_core_hsalsa20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 565 "hs/Libsodium.chs" #-}


crypto_core_ristretto255_add :: (r ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> (q ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_add a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ristretto255_add'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 567 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_from_hash :: (p ::: Ptr CUChar) -> (r ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_from_hash a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ristretto255_from_hash'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 568 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_is_valid_point :: (p ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_is_valid_point a1 =
  let {a1' = id a1} in 
  crypto_core_ristretto255_is_valid_point'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 569 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_random :: (p ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_random a1 =
  let {a1' = id a1} in 
  crypto_core_ristretto255_random'_ a1' >>
  return ()

{-# LINE 570 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_add :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_add a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ristretto255_scalar_add'_ a1' a2' a3' >>
  return ()

{-# LINE 571 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_complement :: (comp ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_complement a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ristretto255_scalar_complement'_ a1' a2' >>
  return ()

{-# LINE 572 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_invert :: (recip ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_scalar_invert a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ristretto255_scalar_invert'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 573 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_mul :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_mul a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ristretto255_scalar_mul'_ a1' a2' a3' >>
  return ()

{-# LINE 574 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_negate :: (neg ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_negate a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ristretto255_scalar_negate'_ a1' a2' >>
  return ()

{-# LINE 575 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_random :: (r ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_random a1 =
  let {a1' = id a1} in 
  crypto_core_ristretto255_scalar_random'_ a1' >>
  return ()

{-# LINE 576 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_reduce :: (r ::: Ptr CUChar) -> (s ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_reduce a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_core_ristretto255_scalar_reduce'_ a1' a2' >>
  return ()

{-# LINE 577 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_scalar_sub :: (z ::: Ptr CUChar) -> (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ()
crypto_core_ristretto255_scalar_sub a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ristretto255_scalar_sub'_ a1' a2' a3' >>
  return ()

{-# LINE 578 "hs/Libsodium.chs" #-}

crypto_core_ristretto255_sub :: (r ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> (q ::: Ptr CUChar) -> IO ((CInt))
crypto_core_ristretto255_sub a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_core_ristretto255_sub'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 579 "hs/Libsodium.chs" #-}


crypto_core_salsa2012 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_salsa2012 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_core_salsa2012'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 581 "hs/Libsodium.chs" #-}

crypto_core_salsa208 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_salsa208 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_core_salsa208'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 582 "hs/Libsodium.chs" #-}

crypto_core_salsa20 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> IO ((CInt))
crypto_core_salsa20 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_core_salsa20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 583 "hs/Libsodium.chs" #-}


crypto_generichash_blake2b_final :: (state ::: Ptr Crypto_generichash_blake2b_state) -> (out ::: Ptr CUChar) -> (outlen ::: CSize) -> IO ((CInt))
crypto_generichash_blake2b_final a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_generichash_blake2b_final'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 585 "hs/Libsodium.chs" #-}

crypto_generichash_blake2b_init :: (state ::: Ptr Crypto_generichash_blake2b_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> (outlen ::: CSize) -> IO ((CInt))
crypto_generichash_blake2b_init a1 a2 a3 a4 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_generichash_blake2b_init'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 586 "hs/Libsodium.chs" #-}

crypto_generichash_blake2b_init_salt_personal :: (state ::: Ptr Crypto_generichash_blake2b_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> (outlen ::: CSize) -> (salt ::: Ptr CUChar) -> (personal ::: Ptr CUChar) -> IO ((CInt))
crypto_generichash_blake2b_init_salt_personal a1 a2 a3 a4 a5 a6 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_generichash_blake2b_init_salt_personal'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 587 "hs/Libsodium.chs" #-}

crypto_generichash_blake2b_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_generichash_blake2b_keygen a1 =
  let {a1' = id a1} in 
  crypto_generichash_blake2b_keygen'_ a1' >>
  return ()

{-# LINE 588 "hs/Libsodium.chs" #-}

crypto_generichash_blake2b :: (out ::: Ptr CUChar) -> (outlen ::: CSize) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_generichash_blake2b a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_generichash_blake2b'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 589 "hs/Libsodium.chs" #-}

crypto_generichash_blake2b_salt_personal :: (out ::: Ptr CUChar) -> (outlen ::: CSize) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> (salt ::: Ptr CUChar) -> (personal ::: Ptr CUChar) -> IO ((CInt))
crypto_generichash_blake2b_salt_personal a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  crypto_generichash_blake2b_salt_personal'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 590 "hs/Libsodium.chs" #-}

crypto_generichash_blake2b_update :: (state ::: Ptr Crypto_generichash_blake2b_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_generichash_blake2b_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_generichash_blake2b_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 591 "hs/Libsodium.chs" #-}


crypto_generichash_final :: (state ::: Ptr Crypto_generichash_state) -> (out ::: Ptr CUChar) -> (outlen ::: CSize) -> IO ((CInt))
crypto_generichash_final a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_generichash_final'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 593 "hs/Libsodium.chs" #-}

crypto_generichash_init :: (state ::: Ptr Crypto_generichash_state) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> (outlen ::: CSize) -> IO ((CInt))
crypto_generichash_init a1 a2 a3 a4 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_generichash_init'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 594 "hs/Libsodium.chs" #-}

crypto_generichash_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_generichash_keygen a1 =
  let {a1' = id a1} in 
  crypto_generichash_keygen'_ a1' >>
  return ()

{-# LINE 595 "hs/Libsodium.chs" #-}

crypto_generichash :: (out ::: Ptr CUChar) -> (outlen ::: CSize) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (key ::: Ptr CUChar) -> (keylen ::: CSize) -> IO ((CInt))
crypto_generichash a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_generichash'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 596 "hs/Libsodium.chs" #-}

crypto_generichash_update :: (state ::: Ptr Crypto_generichash_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_generichash_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_generichash_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 597 "hs/Libsodium.chs" #-}


crypto_hash :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_hash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 599 "hs/Libsodium.chs" #-}


crypto_hash_sha256_final :: (state ::: Ptr Crypto_hash_sha256_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_hash_sha256_final a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_hash_sha256_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 601 "hs/Libsodium.chs" #-}

crypto_hash_sha256_init :: (state ::: Ptr Crypto_hash_sha256_state) -> IO ((CInt))
crypto_hash_sha256_init a1 =
  let {a1' = castPtr a1} in 
  crypto_hash_sha256_init'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 602 "hs/Libsodium.chs" #-}

crypto_hash_sha256 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash_sha256 a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_hash_sha256'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 603 "hs/Libsodium.chs" #-}

crypto_hash_sha256_update :: (state ::: Ptr Crypto_hash_sha256_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash_sha256_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_hash_sha256_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 604 "hs/Libsodium.chs" #-}


crypto_hash_sha512_final :: (state ::: Ptr Crypto_hash_sha512_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_hash_sha512_final a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_hash_sha512_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 606 "hs/Libsodium.chs" #-}

crypto_hash_sha512_init :: (state ::: Ptr Crypto_hash_sha512_state) -> IO ((CInt))
crypto_hash_sha512_init a1 =
  let {a1' = castPtr a1} in 
  crypto_hash_sha512_init'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 607 "hs/Libsodium.chs" #-}

crypto_hash_sha512 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash_sha512 a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_hash_sha512'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 608 "hs/Libsodium.chs" #-}

crypto_hash_sha512_update :: (state ::: Ptr Crypto_hash_sha512_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_hash_sha512_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_hash_sha512_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 609 "hs/Libsodium.chs" #-}


crypto_kdf_blake2b_derive_from_key :: (subkey ::: Ptr CUChar) -> (subkey_len ::: CSize) -> (subkey_id ::: Word64) -> (ctx ::: Ptr CChar) -> (key ::: Ptr CUChar) -> IO ((CInt))
crypto_kdf_blake2b_derive_from_key a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_kdf_blake2b_derive_from_key'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 611 "hs/Libsodium.chs" #-}


crypto_kdf_derive_from_key :: (subkey ::: Ptr CUChar) -> (subkey_len ::: CSize) -> (subkey_id ::: Word64) -> (ctx ::: Ptr CChar) -> (key ::: Ptr CUChar) -> IO ((CInt))
crypto_kdf_derive_from_key a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_kdf_derive_from_key'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 613 "hs/Libsodium.chs" #-}

crypto_kdf_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_kdf_keygen a1 =
  let {a1' = id a1} in 
  crypto_kdf_keygen'_ a1' >>
  return ()

{-# LINE 614 "hs/Libsodium.chs" #-}


crypto_kx_client_session_keys :: (rx ::: Ptr CUChar) -> (tx ::: Ptr CUChar) -> (client_pk ::: Ptr CUChar) -> (client_sk ::: Ptr CUChar) -> (server_pk ::: Ptr CUChar) -> IO ((CInt))
crypto_kx_client_session_keys a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_kx_client_session_keys'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 616 "hs/Libsodium.chs" #-}

crypto_kx_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_kx_keypair a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_kx_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 617 "hs/Libsodium.chs" #-}

crypto_kx_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_kx_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_kx_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 618 "hs/Libsodium.chs" #-}

crypto_kx_server_session_keys :: (rx ::: Ptr CUChar) -> (tx ::: Ptr CUChar) -> (server_pk ::: Ptr CUChar) -> (server_sk ::: Ptr CUChar) -> (client_pk ::: Ptr CUChar) -> IO ((CInt))
crypto_kx_server_session_keys a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_kx_server_session_keys'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 619 "hs/Libsodium.chs" #-}


crypto_onetimeauth_final :: (state ::: Ptr Crypto_onetimeauth_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_final a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_onetimeauth_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 621 "hs/Libsodium.chs" #-}

crypto_onetimeauth_init :: (state ::: Ptr Crypto_onetimeauth_state) -> (key ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_init a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_onetimeauth_init'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 622 "hs/Libsodium.chs" #-}

crypto_onetimeauth_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_onetimeauth_keygen a1 =
  let {a1' = id a1} in 
  crypto_onetimeauth_keygen'_ a1' >>
  return ()

{-# LINE 623 "hs/Libsodium.chs" #-}


crypto_onetimeauth_poly1305_final :: (state ::: Ptr Crypto_onetimeauth_poly1305_state) -> (out ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_poly1305_final a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_onetimeauth_poly1305_final'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 625 "hs/Libsodium.chs" #-}

crypto_onetimeauth_poly1305_init :: (state ::: Ptr Crypto_onetimeauth_poly1305_state) -> (key ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_poly1305_init a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  crypto_onetimeauth_poly1305_init'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 626 "hs/Libsodium.chs" #-}

crypto_onetimeauth_poly1305_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_onetimeauth_poly1305_keygen a1 =
  let {a1' = id a1} in 
  crypto_onetimeauth_poly1305_keygen'_ a1' >>
  return ()

{-# LINE 627 "hs/Libsodium.chs" #-}

crypto_onetimeauth_poly1305 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_poly1305 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_onetimeauth_poly1305'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 628 "hs/Libsodium.chs" #-}

crypto_onetimeauth_poly1305_update :: (state ::: Ptr Crypto_onetimeauth_poly1305_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_onetimeauth_poly1305_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_onetimeauth_poly1305_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 629 "hs/Libsodium.chs" #-}

crypto_onetimeauth_poly1305_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_poly1305_verify a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_onetimeauth_poly1305_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 630 "hs/Libsodium.chs" #-}


crypto_onetimeauth :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_onetimeauth'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 632 "hs/Libsodium.chs" #-}

crypto_onetimeauth_update :: (state ::: Ptr Crypto_onetimeauth_state) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> IO ((CInt))
crypto_onetimeauth_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_onetimeauth_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 633 "hs/Libsodium.chs" #-}

crypto_onetimeauth_verify :: (h ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_onetimeauth_verify a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_onetimeauth_verify'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 634 "hs/Libsodium.chs" #-}


crypto_pwhash_argon2id :: (out ::: Ptr CUChar) -> (outlen ::: CULLong) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (salt ::: Ptr CUChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> (alg ::: CInt) -> IO ((CInt))
crypto_pwhash_argon2id a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  crypto_pwhash_argon2id'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 636 "hs/Libsodium.chs" #-}

crypto_pwhash_argon2id_str_needs_rehash :: (str ::: Ptr CChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_argon2id_str_needs_rehash a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_pwhash_argon2id_str_needs_rehash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 637 "hs/Libsodium.chs" #-}

crypto_pwhash_argon2id_str :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_argon2id_str a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_pwhash_argon2id_str'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 638 "hs/Libsodium.chs" #-}

crypto_pwhash_argon2id_str_verify :: (str ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> IO ((CInt))
crypto_pwhash_argon2id_str_verify a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_pwhash_argon2id_str_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 639 "hs/Libsodium.chs" #-}

crypto_pwhash_argon2i :: (out ::: Ptr CUChar) -> (outlen ::: CULLong) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (salt ::: Ptr CUChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> (alg ::: CInt) -> IO ((CInt))
crypto_pwhash_argon2i a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  crypto_pwhash_argon2i'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 640 "hs/Libsodium.chs" #-}

crypto_pwhash_argon2i_str_needs_rehash :: (str ::: Ptr CChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_argon2i_str_needs_rehash a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_pwhash_argon2i_str_needs_rehash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 641 "hs/Libsodium.chs" #-}

crypto_pwhash_argon2i_str :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_argon2i_str a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_pwhash_argon2i_str'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 642 "hs/Libsodium.chs" #-}

crypto_pwhash_argon2i_str_verify :: (str ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> IO ((CInt))
crypto_pwhash_argon2i_str_verify a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_pwhash_argon2i_str_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 643 "hs/Libsodium.chs" #-}


crypto_pwhash :: (out ::: Ptr CUChar) -> (outlen ::: CULLong) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (salt ::: Ptr CUChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> (alg ::: CInt) -> IO ((CInt))
crypto_pwhash a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  crypto_pwhash'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 645 "hs/Libsodium.chs" #-}

crypto_pwhash_str_alg :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> (alg ::: CInt) -> IO ((CInt))
crypto_pwhash_str_alg a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_pwhash_str_alg'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 646 "hs/Libsodium.chs" #-}

crypto_pwhash_str_needs_rehash :: (str ::: Ptr CChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_str_needs_rehash a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_pwhash_str_needs_rehash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 647 "hs/Libsodium.chs" #-}

crypto_pwhash_str :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_str a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_pwhash_str'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 648 "hs/Libsodium.chs" #-}

crypto_pwhash_str_verify :: (str ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> IO ((CInt))
crypto_pwhash_str_verify a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_pwhash_str_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 649 "hs/Libsodium.chs" #-}


crypto_pwhash_scryptsalsa208sha256_ll :: (passwd ::: Ptr Word8) -> (passwdlen ::: CSize) -> (salt ::: Ptr Word8) -> (saltlen ::: CSize) -> (n ::: Word64) -> (r ::: Word32) -> (p ::: Word32) -> (buf ::: Ptr Word8) -> (buflen ::: CSize) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256_ll a1 a2 a3 a4 a5 a6 a7 a8 a9 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  let {a9' = id a9} in 
  crypto_pwhash_scryptsalsa208sha256_ll'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 651 "hs/Libsodium.chs" #-}

crypto_pwhash_scryptsalsa208sha256 :: (out ::: Ptr CUChar) -> (outlen ::: CULLong) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (salt ::: Ptr CUChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256 a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  crypto_pwhash_scryptsalsa208sha256'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 652 "hs/Libsodium.chs" #-}

crypto_pwhash_scryptsalsa208sha256_str_needs_rehash :: (str ::: Ptr CChar) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256_str_needs_rehash a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_pwhash_scryptsalsa208sha256_str_needs_rehash'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 653 "hs/Libsodium.chs" #-}

crypto_pwhash_scryptsalsa208sha256_str :: (out ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> (opslimit ::: CULLong) -> (memlimit ::: CSize) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256_str a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_pwhash_scryptsalsa208sha256_str'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 654 "hs/Libsodium.chs" #-}

crypto_pwhash_scryptsalsa208sha256_str_verify :: (str ::: Ptr CChar) -> (passwd ::: Ptr CChar) -> (passwdlen ::: CULLong) -> IO ((CInt))
crypto_pwhash_scryptsalsa208sha256_str_verify a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_pwhash_scryptsalsa208sha256_str_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 655 "hs/Libsodium.chs" #-}


crypto_scalarmult_curve25519_base :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_curve25519_base a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_scalarmult_curve25519_base'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 657 "hs/Libsodium.chs" #-}

crypto_scalarmult_curve25519 :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_curve25519 a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_scalarmult_curve25519'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 658 "hs/Libsodium.chs" #-}

crypto_scalarmult_ed25519_base_noclamp :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ed25519_base_noclamp a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_scalarmult_ed25519_base_noclamp'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 659 "hs/Libsodium.chs" #-}

crypto_scalarmult_ed25519_base :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ed25519_base a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_scalarmult_ed25519_base'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 660 "hs/Libsodium.chs" #-}

crypto_scalarmult_ed25519_noclamp :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ed25519_noclamp a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_scalarmult_ed25519_noclamp'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 661 "hs/Libsodium.chs" #-}

crypto_scalarmult_ed25519 :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ed25519 a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_scalarmult_ed25519'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 662 "hs/Libsodium.chs" #-}


crypto_scalarmult_base :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_base a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_scalarmult_base'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 664 "hs/Libsodium.chs" #-}

crypto_scalarmult :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_scalarmult'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 665 "hs/Libsodium.chs" #-}


crypto_scalarmult_ristretto255_base :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ristretto255_base a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_scalarmult_ristretto255_base'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 667 "hs/Libsodium.chs" #-}

crypto_scalarmult_ristretto255 :: (q ::: Ptr CUChar) -> (n ::: Ptr CUChar) -> (p ::: Ptr CUChar) -> IO ((CInt))
crypto_scalarmult_ristretto255 a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_scalarmult_ristretto255'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 668 "hs/Libsodium.chs" #-}


crypto_secretbox_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_detached a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_secretbox_detached'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 670 "hs/Libsodium.chs" #-}

crypto_secretbox_easy :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_easy a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_secretbox_easy'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 671 "hs/Libsodium.chs" #-}

crypto_secretbox_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_secretbox_keygen a1 =
  let {a1' = id a1} in 
  crypto_secretbox_keygen'_ a1' >>
  return ()

{-# LINE 672 "hs/Libsodium.chs" #-}

crypto_secretbox_open_detached :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_open_detached a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_secretbox_open_detached'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 673 "hs/Libsodium.chs" #-}

crypto_secretbox_open_easy :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_open_easy a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_secretbox_open_easy'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 674 "hs/Libsodium.chs" #-}

crypto_secretbox_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_secretbox_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 675 "hs/Libsodium.chs" #-}

crypto_secretbox :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_secretbox'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 676 "hs/Libsodium.chs" #-}


crypto_secretbox_xchacha20poly1305_detached :: (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_xchacha20poly1305_detached a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_secretbox_xchacha20poly1305_detached'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 678 "hs/Libsodium.chs" #-}

crypto_secretbox_xchacha20poly1305_easy :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_xchacha20poly1305_easy a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_secretbox_xchacha20poly1305_easy'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 679 "hs/Libsodium.chs" #-}

crypto_secretbox_xchacha20poly1305_open_detached :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (mac ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_xchacha20poly1305_open_detached a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_secretbox_xchacha20poly1305_open_detached'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 680 "hs/Libsodium.chs" #-}

crypto_secretbox_xchacha20poly1305_open_easy :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_xchacha20poly1305_open_easy a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_secretbox_xchacha20poly1305_open_easy'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 681 "hs/Libsodium.chs" #-}


crypto_secretbox_xsalsa20poly1305_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_secretbox_xsalsa20poly1305_keygen a1 =
  let {a1' = id a1} in 
  crypto_secretbox_xsalsa20poly1305_keygen'_ a1' >>
  return ()

{-# LINE 683 "hs/Libsodium.chs" #-}

crypto_secretbox_xsalsa20poly1305_open :: (m ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_xsalsa20poly1305_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_secretbox_xsalsa20poly1305_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 684 "hs/Libsodium.chs" #-}

crypto_secretbox_xsalsa20poly1305 :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretbox_xsalsa20poly1305 a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_secretbox_xsalsa20poly1305'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 685 "hs/Libsodium.chs" #-}


crypto_secretstream_xchacha20poly1305_init_pull :: (state ::: Ptr Crypto_secretstream_xchacha20poly1305_state) -> (header ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretstream_xchacha20poly1305_init_pull a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_secretstream_xchacha20poly1305_init_pull'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 687 "hs/Libsodium.chs" #-}

crypto_secretstream_xchacha20poly1305_init_push :: (state ::: Ptr Crypto_secretstream_xchacha20poly1305_state) -> (header ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_secretstream_xchacha20poly1305_init_push a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_secretstream_xchacha20poly1305_init_push'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 688 "hs/Libsodium.chs" #-}

crypto_secretstream_xchacha20poly1305_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_secretstream_xchacha20poly1305_keygen a1 =
  let {a1' = id a1} in 
  crypto_secretstream_xchacha20poly1305_keygen'_ a1' >>
  return ()

{-# LINE 689 "hs/Libsodium.chs" #-}

crypto_secretstream_xchacha20poly1305_pull :: (state ::: Ptr Crypto_secretstream_xchacha20poly1305_state) -> (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (tag_p ::: Ptr CUChar) -> (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> IO ((CInt))
crypto_secretstream_xchacha20poly1305_pull a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  crypto_secretstream_xchacha20poly1305_pull'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 690 "hs/Libsodium.chs" #-}

crypto_secretstream_xchacha20poly1305_push :: (state ::: Ptr Crypto_secretstream_xchacha20poly1305_state) -> (c ::: Ptr CUChar) -> (clen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (ad ::: Ptr CUChar) -> (adlen ::: CULLong) -> (tag ::: CUChar) -> IO ((CInt))
crypto_secretstream_xchacha20poly1305_push a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  crypto_secretstream_xchacha20poly1305_push'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 691 "hs/Libsodium.chs" #-}

crypto_secretstream_xchacha20poly1305_rekey :: (state ::: Ptr Crypto_secretstream_xchacha20poly1305_state) -> IO ()
crypto_secretstream_xchacha20poly1305_rekey a1 =
  let {a1' = castPtr a1} in 
  crypto_secretstream_xchacha20poly1305_rekey'_ a1' >>
  return ()

{-# LINE 692 "hs/Libsodium.chs" #-}


crypto_shorthash_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_shorthash_keygen a1 =
  let {a1' = id a1} in 
  crypto_shorthash_keygen'_ a1' >>
  return ()

{-# LINE 694 "hs/Libsodium.chs" #-}

crypto_shorthash :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_shorthash a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_shorthash'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 695 "hs/Libsodium.chs" #-}

crypto_shorthash_siphash24 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_shorthash_siphash24 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_shorthash_siphash24'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 696 "hs/Libsodium.chs" #-}

crypto_shorthash_siphashx24 :: (out ::: Ptr CUChar) -> (in_ ::: Ptr CUChar) -> (inlen ::: CULLong) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_shorthash_siphashx24 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_shorthash_siphashx24'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 697 "hs/Libsodium.chs" #-}


crypto_sign_ed25519_detached :: (sig ::: Ptr CUChar) -> (siglen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_detached a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_sign_ed25519_detached'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 699 "hs/Libsodium.chs" #-}

crypto_sign_ed25519_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_keypair a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_sign_ed25519_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 700 "hs/Libsodium.chs" #-}

crypto_sign_ed25519_open :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (sm ::: Ptr CUChar) -> (smlen ::: CULLong) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_sign_ed25519_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 701 "hs/Libsodium.chs" #-}

crypto_sign_ed25519_pk_to_curve25519 :: (curve25519_pk ::: Ptr CUChar) -> (ed25519_pk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_pk_to_curve25519 a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_sign_ed25519_pk_to_curve25519'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 702 "hs/Libsodium.chs" #-}

crypto_sign_ed25519 :: (sm ::: Ptr CUChar) -> (smlen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519 a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_sign_ed25519'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 703 "hs/Libsodium.chs" #-}

crypto_sign_ed25519_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_sign_ed25519_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 704 "hs/Libsodium.chs" #-}

crypto_sign_ed25519_sk_to_curve25519 :: (curve25519_sk ::: Ptr CUChar) -> (ed25519_sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_sk_to_curve25519 a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_sign_ed25519_sk_to_curve25519'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 705 "hs/Libsodium.chs" #-}

crypto_sign_ed25519_sk_to_pk :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_sk_to_pk a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_sign_ed25519_sk_to_pk'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 706 "hs/Libsodium.chs" #-}

crypto_sign_ed25519_sk_to_seed :: (seed ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_sk_to_seed a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_sign_ed25519_sk_to_seed'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 707 "hs/Libsodium.chs" #-}

crypto_sign_ed25519_verify_detached :: (sig ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519_verify_detached a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_sign_ed25519_verify_detached'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 708 "hs/Libsodium.chs" #-}


crypto_sign_ed25519ph_final_create :: (state ::: Ptr Crypto_sign_ed25519ph_state) -> (sig ::: Ptr CUChar) -> (siglen_p ::: Ptr CULLong) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519ph_final_create a1 a2 a3 a4 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_sign_ed25519ph_final_create'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 710 "hs/Libsodium.chs" #-}

crypto_sign_ed25519ph_final_verify :: (state ::: Ptr Crypto_sign_ed25519ph_state) -> (sig ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_ed25519ph_final_verify a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_sign_ed25519ph_final_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 711 "hs/Libsodium.chs" #-}

crypto_sign_ed25519ph_init :: (state ::: Ptr Crypto_sign_ed25519ph_state) -> IO ((CInt))
crypto_sign_ed25519ph_init a1 =
  let {a1' = castPtr a1} in 
  crypto_sign_ed25519ph_init'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 712 "hs/Libsodium.chs" #-}

crypto_sign_ed25519ph_update :: (state ::: Ptr Crypto_sign_ed25519ph_state) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> IO ((CInt))
crypto_sign_ed25519ph_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_sign_ed25519ph_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 713 "hs/Libsodium.chs" #-}


crypto_sign_detached :: (sig ::: Ptr CUChar) -> (siglen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_detached a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_sign_detached'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 715 "hs/Libsodium.chs" #-}

crypto_sign_final_create :: (state ::: Ptr Crypto_sign_state) -> (sig ::: Ptr CUChar) -> (siglen_p ::: Ptr CULLong) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_final_create a1 a2 a3 a4 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_sign_final_create'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 716 "hs/Libsodium.chs" #-}

crypto_sign_final_verify :: (state ::: Ptr Crypto_sign_state) -> (sig ::: Ptr CUChar) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_final_verify a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_sign_final_verify'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 717 "hs/Libsodium.chs" #-}

crypto_sign_init :: (state ::: Ptr Crypto_sign_state) -> IO ((CInt))
crypto_sign_init a1 =
  let {a1' = castPtr a1} in 
  crypto_sign_init'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 718 "hs/Libsodium.chs" #-}

crypto_sign_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_keypair a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_sign_keypair'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 719 "hs/Libsodium.chs" #-}

crypto_sign_open :: (m ::: Ptr CUChar) -> (mlen_p ::: Ptr CULLong) -> (sm ::: Ptr CUChar) -> (smlen ::: CULLong) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_open a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_sign_open'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 720 "hs/Libsodium.chs" #-}

crypto_sign :: (sm ::: Ptr CUChar) -> (smlen_p ::: Ptr CULLong) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (sk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_sign'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 721 "hs/Libsodium.chs" #-}

crypto_sign_seed_keypair :: (pk ::: Ptr CUChar) -> (sk ::: Ptr CUChar) -> (seed ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_seed_keypair a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_sign_seed_keypair'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 722 "hs/Libsodium.chs" #-}

crypto_sign_update :: (state ::: Ptr Crypto_sign_state) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> IO ((CInt))
crypto_sign_update a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  crypto_sign_update'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 723 "hs/Libsodium.chs" #-}

crypto_sign_verify_detached :: (sig ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (pk ::: Ptr CUChar) -> IO ((CInt))
crypto_sign_verify_detached a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_sign_verify_detached'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 724 "hs/Libsodium.chs" #-}


crypto_stream_chacha20_ietf_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_stream_chacha20_ietf_keygen a1 =
  let {a1' = id a1} in 
  crypto_stream_chacha20_ietf_keygen'_ a1' >>
  return ()

{-# LINE 726 "hs/Libsodium.chs" #-}

crypto_stream_chacha20_ietf :: (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_chacha20_ietf a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_stream_chacha20_ietf'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 727 "hs/Libsodium.chs" #-}

crypto_stream_chacha20_ietf_xor_ic :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (ic ::: Word32) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_chacha20_ietf_xor_ic a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_stream_chacha20_ietf_xor_ic'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 728 "hs/Libsodium.chs" #-}

crypto_stream_chacha20_ietf_xor :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_chacha20_ietf_xor a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_stream_chacha20_ietf_xor'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 729 "hs/Libsodium.chs" #-}

crypto_stream_chacha20_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_stream_chacha20_keygen a1 =
  let {a1' = id a1} in 
  crypto_stream_chacha20_keygen'_ a1' >>
  return ()

{-# LINE 730 "hs/Libsodium.chs" #-}

crypto_stream_chacha20 :: (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_chacha20 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_stream_chacha20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 731 "hs/Libsodium.chs" #-}

crypto_stream_chacha20_xor_ic :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (ic ::: Word64) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_chacha20_xor_ic a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_stream_chacha20_xor_ic'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 732 "hs/Libsodium.chs" #-}

crypto_stream_chacha20_xor :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_chacha20_xor a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_stream_chacha20_xor'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 733 "hs/Libsodium.chs" #-}


crypto_stream_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_stream_keygen a1 =
  let {a1' = id a1} in 
  crypto_stream_keygen'_ a1' >>
  return ()

{-# LINE 735 "hs/Libsodium.chs" #-}

crypto_stream_xor :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_xor a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_stream_xor'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 736 "hs/Libsodium.chs" #-}

crypto_stream :: (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_stream'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 737 "hs/Libsodium.chs" #-}


crypto_stream_salsa2012_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_stream_salsa2012_keygen a1 =
  let {a1' = id a1} in 
  crypto_stream_salsa2012_keygen'_ a1' >>
  return ()

{-# LINE 739 "hs/Libsodium.chs" #-}

crypto_stream_salsa2012 :: (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_salsa2012 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_stream_salsa2012'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 740 "hs/Libsodium.chs" #-}

crypto_stream_salsa2012_xor :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_salsa2012_xor a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_stream_salsa2012_xor'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 741 "hs/Libsodium.chs" #-}

crypto_stream_salsa208_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_stream_salsa208_keygen a1 =
  let {a1' = id a1} in 
  crypto_stream_salsa208_keygen'_ a1' >>
  return ()

{-# LINE 742 "hs/Libsodium.chs" #-}

crypto_stream_salsa208 :: (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_salsa208 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_stream_salsa208'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 743 "hs/Libsodium.chs" #-}

crypto_stream_salsa208_xor :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_salsa208_xor a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_stream_salsa208_xor'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 744 "hs/Libsodium.chs" #-}

crypto_stream_salsa20_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_stream_salsa20_keygen a1 =
  let {a1' = id a1} in 
  crypto_stream_salsa20_keygen'_ a1' >>
  return ()

{-# LINE 745 "hs/Libsodium.chs" #-}

crypto_stream_salsa20 :: (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_salsa20 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_stream_salsa20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 746 "hs/Libsodium.chs" #-}

crypto_stream_salsa20_xor_ic :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (ic ::: Word64) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_salsa20_xor_ic a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_stream_salsa20_xor_ic'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 747 "hs/Libsodium.chs" #-}

crypto_stream_salsa20_xor :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_salsa20_xor a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_stream_salsa20_xor'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 748 "hs/Libsodium.chs" #-}


crypto_stream_xchacha20_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_stream_xchacha20_keygen a1 =
  let {a1' = id a1} in 
  crypto_stream_xchacha20_keygen'_ a1' >>
  return ()

{-# LINE 750 "hs/Libsodium.chs" #-}

crypto_stream_xchacha20 :: (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_xchacha20 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_stream_xchacha20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 751 "hs/Libsodium.chs" #-}

crypto_stream_xchacha20_xor_ic :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (ic ::: Word64) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_xchacha20_xor_ic a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_stream_xchacha20_xor_ic'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 752 "hs/Libsodium.chs" #-}

crypto_stream_xchacha20_xor :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_xchacha20_xor a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_stream_xchacha20_xor'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 753 "hs/Libsodium.chs" #-}


crypto_stream_xsalsa20_keygen :: (k ::: Ptr CUChar) -> IO ()
crypto_stream_xsalsa20_keygen a1 =
  let {a1' = id a1} in 
  crypto_stream_xsalsa20_keygen'_ a1' >>
  return ()

{-# LINE 755 "hs/Libsodium.chs" #-}

crypto_stream_xsalsa20 :: (c ::: Ptr CUChar) -> (clen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_xsalsa20 a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  crypto_stream_xsalsa20'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 756 "hs/Libsodium.chs" #-}

crypto_stream_xsalsa20_xor_ic :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (ic ::: Word64) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_xsalsa20_xor_ic a1 a2 a3 a4 a5 a6 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  crypto_stream_xsalsa20_xor_ic'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 757 "hs/Libsodium.chs" #-}

crypto_stream_xsalsa20_xor :: (c ::: Ptr CUChar) -> (m ::: Ptr CUChar) -> (mlen ::: CULLong) -> (n ::: Ptr CUChar) -> (k ::: Ptr CUChar) -> IO ((CInt))
crypto_stream_xsalsa20_xor a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  crypto_stream_xsalsa20_xor'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 758 "hs/Libsodium.chs" #-}


crypto_verify_16 :: (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ((CInt))
crypto_verify_16 a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_verify_16'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 760 "hs/Libsodium.chs" #-}

crypto_verify_32 :: (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ((CInt))
crypto_verify_32 a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_verify_32'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 761 "hs/Libsodium.chs" #-}

crypto_verify_64 :: (x ::: Ptr CUChar) -> (y ::: Ptr CUChar) -> IO ((CInt))
crypto_verify_64 a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  crypto_verify_64'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 762 "hs/Libsodium.chs" #-}


randombytes_buf :: (buf ::: Ptr x) -> (size ::: CSize) -> IO ()
randombytes_buf a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  randombytes_buf'_ a1' a2' >>
  return ()

{-# LINE 764 "hs/Libsodium.chs" #-}

randombytes_buf_deterministic :: (buf ::: Ptr x) -> (size ::: CSize) -> (seed ::: Ptr CUChar) -> IO ()
randombytes_buf_deterministic a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  randombytes_buf_deterministic'_ a1' a2' a3' >>
  return ()

{-# LINE 765 "hs/Libsodium.chs" #-}

randombytes_close :: IO ((CInt))
randombytes_close =
  randombytes_close'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 766 "hs/Libsodium.chs" #-}

randombytes :: (buf ::: Ptr CUChar) -> (buf_len ::: CULLong) -> IO ()
randombytes a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  randombytes'_ a1' a2' >>
  return ()

{-# LINE 767 "hs/Libsodium.chs" #-}

randombytes_implementation_name :: IO ((CString))
randombytes_implementation_name =
  randombytes_implementation_name'_ >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 768 "hs/Libsodium.chs" #-}

randombytes_random :: IO ((Word32))
randombytes_random =
  randombytes_random'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 769 "hs/Libsodium.chs" #-}

randombytes_set_implementation :: (impl ::: Ptr Randombytes_implementation) -> IO ((CInt))
randombytes_set_implementation a1 =
  let {a1' = castPtr a1} in 
  randombytes_set_implementation'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 770 "hs/Libsodium.chs" #-}

randombytes_stir :: IO ()
randombytes_stir =
  randombytes_stir'_ >>
  return ()

{-# LINE 771 "hs/Libsodium.chs" #-}

randombytes_uniform :: (upper_bound ::: Word32) -> IO ((Word32))
randombytes_uniform a1 =
  let {a1' = id a1} in 
  randombytes_uniform'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 772 "hs/Libsodium.chs" #-}


foreign import ccall unsafe "&randombytes_sysrandom_implementation"
  randombytes_sysrandom_implementation :: Ptr Randombytes_implementation
foreign import ccall unsafe "&randombytes_internal_implementation"
  randombytes_internal_implementation :: Ptr Randombytes_implementation

sodium_init :: IO ((CInt))
sodium_init :: IO CInt
sodium_init =
  IO CInt
sodium_init'_ forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CInt
res ->
  let {res' :: CInt
res' = forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
res} in
  forall (m :: * -> *) a. Monad m => a -> m a
return (CInt
res')

{-# LINE 779 "hs/Libsodium.chs" #-}


sodium_runtime_has_aesni :: IO ((CInt))
sodium_runtime_has_aesni =
  sodium_runtime_has_aesni'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 781 "hs/Libsodium.chs" #-}

sodium_runtime_has_avx :: IO ((CInt))
sodium_runtime_has_avx =
  sodium_runtime_has_avx'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 782 "hs/Libsodium.chs" #-}

sodium_runtime_has_avx2 :: IO ((CInt))
sodium_runtime_has_avx2 =
  sodium_runtime_has_avx2'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 783 "hs/Libsodium.chs" #-}

sodium_runtime_has_avx512f :: IO ((CInt))
sodium_runtime_has_avx512f =
  sodium_runtime_has_avx512f'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 784 "hs/Libsodium.chs" #-}

sodium_runtime_has_neon :: IO ((CInt))
sodium_runtime_has_neon =
  sodium_runtime_has_neon'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 785 "hs/Libsodium.chs" #-}

sodium_runtime_has_pclmul :: IO ((CInt))
sodium_runtime_has_pclmul =
  sodium_runtime_has_pclmul'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 786 "hs/Libsodium.chs" #-}

sodium_runtime_has_rdrand :: IO ((CInt))
sodium_runtime_has_rdrand =
  sodium_runtime_has_rdrand'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 787 "hs/Libsodium.chs" #-}

sodium_runtime_has_sse2 :: IO ((CInt))
sodium_runtime_has_sse2 =
  sodium_runtime_has_sse2'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 788 "hs/Libsodium.chs" #-}

sodium_runtime_has_sse3 :: IO ((CInt))
sodium_runtime_has_sse3 =
  sodium_runtime_has_sse3'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 789 "hs/Libsodium.chs" #-}

sodium_runtime_has_sse41 :: IO ((CInt))
sodium_runtime_has_sse41 =
  sodium_runtime_has_sse41'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 790 "hs/Libsodium.chs" #-}

sodium_runtime_has_ssse3 :: IO ((CInt))
sodium_runtime_has_ssse3 =
  sodium_runtime_has_ssse3'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 791 "hs/Libsodium.chs" #-}


sodium_add :: (a ::: Ptr CUChar) -> (b ::: Ptr CUChar) -> (len ::: CSize) -> IO ()
sodium_add a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  sodium_add'_ a1' a2' a3' >>
  return ()

{-# LINE 793 "hs/Libsodium.chs" #-}

sodium_compare :: (b1_ ::: Ptr CUChar) -> (b2_ ::: Ptr CUChar) -> (len ::: CSize) -> IO ((CInt))
sodium_compare a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  sodium_compare'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 794 "hs/Libsodium.chs" #-}

sodium_increment :: (n ::: Ptr CUChar) -> (nlen ::: CSize) -> IO ()
sodium_increment a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  sodium_increment'_ a1' a2' >>
  return ()

{-# LINE 795 "hs/Libsodium.chs" #-}

sodium_is_zero :: (n ::: Ptr CUChar) -> (nlen ::: CSize) -> IO ((CInt))
sodium_is_zero a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  sodium_is_zero'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 796 "hs/Libsodium.chs" #-}

sodium_pad :: (padded_buflen_p ::: Ptr CSize) -> (buf ::: Ptr CUChar) -> (unpadded_buflen ::: CSize) -> (blocksize ::: CSize) -> (max_buflen ::: CSize) -> IO ((CInt))
sodium_pad a1 a2 a3 a4 a5 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  sodium_pad'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 797 "hs/Libsodium.chs" #-}

sodium_sub :: (a ::: Ptr CUChar) -> (b ::: Ptr CUChar) -> (len ::: CSize) -> IO ()
sodium_sub a1 a2 a3 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  sodium_sub'_ a1' a2' a3' >>
  return ()

{-# LINE 798 "hs/Libsodium.chs" #-}

sodium_unpad :: (unpadded_buflen_p ::: Ptr CSize) -> (buf ::: Ptr CUChar) -> (padded_buflen ::: CSize) -> (blocksize ::: CSize) -> IO ((CInt))
sodium_unpad a1 a2 a3 a4 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  sodium_unpad'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 799 "hs/Libsodium.chs" #-}


sodium_base642bin :: (bin ::: Ptr CUChar) -> (bin_maxlen ::: CSize) -> (b64 ::: Ptr CChar) -> (b64_len ::: CSize) -> (ignore ::: Ptr CChar) -> (bin_len ::: Ptr CSize) -> (b64_end ::: Ptr (Ptr CChar)) -> (variant ::: CInt) -> IO ((CInt))
sodium_base642bin a1 a2 a3 a4 a5 a6 a7 a8 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  let {a8' = id a8} in 
  sodium_base642bin'_ a1' a2' a3' a4' a5' a6' a7' a8' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 801 "hs/Libsodium.chs" #-}

sodium_base64_encoded_len :: (bin_len ::: CSize) -> (variant ::: CInt) -> IO ((CInt))
sodium_base64_encoded_len a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  sodium_base64_encoded_len'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 802 "hs/Libsodium.chs" #-}

sodium_bin2base64 :: (b64 ::: Ptr CChar) -> (b64_maxlen ::: CSize) -> (bin ::: Ptr CUChar) -> (bin_len ::: CSize) -> (variant ::: CInt) -> IO ((CString))
sodium_bin2base64 a1 a2 a3 a4 a5 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  sodium_bin2base64'_ a1' a2' a3' a4' a5' >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 803 "hs/Libsodium.chs" #-}

sodium_bin2hex :: (hex ::: Ptr CChar) -> (hex_maxlen ::: CSize) -> (bin ::: Ptr CUChar) -> (bin_len ::: CSize) -> IO ((CString))
sodium_bin2hex a1 a2 a3 a4 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  sodium_bin2hex'_ a1' a2' a3' a4' >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 804 "hs/Libsodium.chs" #-}

sodium_hex2bin :: (bin ::: Ptr CUChar) -> (bin_maxlen ::: CSize) -> (hex ::: Ptr CChar) -> (hex_len ::: CSize) -> (ignore ::: Ptr CChar) -> (bin_len ::: Ptr CSize) -> (hex_end ::: Ptr  (Ptr CChar)) -> IO ((CInt))
sodium_hex2bin a1 a2 a3 a4 a5 a6 a7 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  let {a5' = id a5} in 
  let {a6' = id a6} in 
  let {a7' = id a7} in 
  sodium_hex2bin'_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 805 "hs/Libsodium.chs" #-}


sodium_allocarray :: (count ::: CSize) -> (size ::: CSize) -> IO ((Ptr a))
sodium_allocarray a1 a2 =
  let {a1' = id a1} in 
  let {a2' = id a2} in 
  sodium_allocarray'_ a1' a2' >>= \res ->
  let {res' = castPtr res} in
  return (res')

{-# LINE 807 "hs/Libsodium.chs" #-}

sodium_free :: (addr ::: Ptr x) -> IO ()
sodium_free a1 =
  let {a1' = castPtr a1} in 
  sodium_free'_ a1' >>
  return ()

{-# LINE 808 "hs/Libsodium.chs" #-}

sodium_malloc :: (size ::: CSize) -> IO ((Ptr a))
sodium_malloc a1 =
  let {a1' = id a1} in 
  sodium_malloc'_ a1' >>= \res ->
  let {res' = castPtr res} in
  return (res')

{-# LINE 809 "hs/Libsodium.chs" #-}

sodium_memcmp :: (b1 ::: Ptr a) -> (b2 ::: Ptr a) -> (len ::: CSize) -> IO ((CInt))
sodium_memcmp a1 a2 a3 =
  let {a1' = castPtr a1} in 
  let {a2' = castPtr a2} in 
  let {a3' = id a3} in 
  sodium_memcmp'_ a1' a2' a3' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 810 "hs/Libsodium.chs" #-}

sodium_memzero :: (pnt ::: Ptr x) -> (len ::: CSize) -> IO ()
sodium_memzero a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  sodium_memzero'_ a1' a2' >>
  return ()

{-# LINE 811 "hs/Libsodium.chs" #-}

sodium_mlock :: (addr ::: Ptr x) -> (len ::: CSize) -> IO ((CInt))
sodium_mlock a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  sodium_mlock'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 812 "hs/Libsodium.chs" #-}

sodium_mprotect_noaccess :: (addr ::: Ptr x) -> IO ((CInt))
sodium_mprotect_noaccess a1 =
  let {a1' = castPtr a1} in 
  sodium_mprotect_noaccess'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 813 "hs/Libsodium.chs" #-}

sodium_mprotect_readonly :: (addr ::: Ptr x) -> IO ((CInt))
sodium_mprotect_readonly a1 =
  let {a1' = castPtr a1} in 
  sodium_mprotect_readonly'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 814 "hs/Libsodium.chs" #-}

sodium_mprotect_readwrite :: (addr ::: Ptr x) -> IO ((CInt))
sodium_mprotect_readwrite a1 =
  let {a1' = castPtr a1} in 
  sodium_mprotect_readwrite'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 815 "hs/Libsodium.chs" #-}

sodium_munlock :: (addr ::: Ptr x) -> (len ::: CSize) -> IO ((CInt))
sodium_munlock a1 a2 =
  let {a1' = castPtr a1} in 
  let {a2' = id a2} in 
  sodium_munlock'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 816 "hs/Libsodium.chs" #-}

sodium_stackzero :: (len ::: CSize) -> IO ()
sodium_stackzero a1 =
  let {a1' = id a1} in 
  sodium_stackzero'_ a1' >>
  return ()

{-# LINE 817 "hs/Libsodium.chs" #-}


--------------------------------------------------------------------------------
-- | This 'FP.FinalizerEnvPtr' zeroes 'CSize' bytes starting at @'Ptr' a@
-- using 'sodium_memzero', and afterwards it 'A.free's the @'Ptr' 'CSize'@.
-- You can attach it to a 'ForeignPtr' using 'addForeignPtrFinalizerEnv'.
--
-- Note: If you want access to a finalizer like this without depending on
-- all of @libsodium@, consider using the
-- Haskell [memzero](https://hackage.haskell.org/package/memzero/docs/Memzero.html#v:finalizerEnvFree) library instead.
foreign import ccall unsafe "hs_libsodium.h &hs_libsodium_finalizerEnvFree"
  sodium_memzero'finalizerEnvFree :: FinalizerEnvPtr CSize a

-- | This 'FP.FinalizerEnvPtr' zeroes 'CSize' bytes starting at @'Ptr' a@
-- using 'sodium_memzero'.
-- You can attach it to a 'ForeignPtr' using 'addForeignPtrFinalizerEnv'.
--
-- Contrary to 'sodium_memzero'finalizerEnvFree', this /doesn't/ 'A.free' the
-- @'Ptr' 'CSize'@.
--
-- Note: If you want access to a finalizer like this without depending on
-- all of @libsodium@, consider using the
-- Haskell [memzero](https://hackage.haskell.org/package/memzero/docs/Memzero.html#v:finalizerEnv) library instead.
foreign import ccall unsafe "hs_libsodium.h &hs_libsodium_finalizerEnv"
  sodium_memzero'finalizerEnv :: FinalizerEnvPtr CSize a

--------------------------------------------------------------------------------
-- $types
--
-- These are types used by some of the functions in "Libsodium".
--
-- * They are exported as opaque types having a particular size and
-- alignment described by their 'Storable' instance.
--
-- * Use the @/xxx/'malloc@ functions to allocate values of type @Xxx@. These
-- will be zeroed using 'sodium_memzero' and released once they become
-- unreachable.
--
-- * @/Xxx/@s obtained through 'peek' (from 'Storable') use the @/xxx/'malloc@
-- allocation and self-cleaning approach, too.
--
-- * Use the @/xxx/'ptr@ function to obtain a @'Ptr' Xxx@ suitable for passing
-- to functions in this module.
--
-- * The constructors of these types are exported in case you want to obtain
-- the underlying 'ForeignPtr' by means other than @/xxx/'malloc@.

newtype Crypto_aead_aes256gcm_state
  = Crypto_aead_aes256gcm_state
    (ForeignPtr Crypto_aead_aes256gcm_state)

instance Storable Crypto_aead_aes256gcm_state where
  sizeOf :: Crypto_aead_aes256gcm_state -> Int
sizeOf Crypto_aead_aes256gcm_state
_ = Int
512
{-# LINE 869 "hs/Libsodium.chs" #-}

  alignment _ = 1
{-# LINE 870 "hs/Libsodium.chs" #-}

  poke pd s = crypto_aead_aes256gcm_state'ptr s $ \ps ->
    copyArray pd ps 1
  peek :: (ctx_ ::: Ptr Crypto_aead_aes256gcm_state)
-> IO Crypto_aead_aes256gcm_state
peek ctx_ ::: Ptr Crypto_aead_aes256gcm_state
ps = do
    Crypto_aead_aes256gcm_state
d <- IO Crypto_aead_aes256gcm_state
crypto_aead_aes256gcm_state'malloc
    forall x.
Crypto_aead_aes256gcm_state
-> ((ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO x) -> IO x
crypto_aead_aes256gcm_state'ptr Crypto_aead_aes256gcm_state
d forall a b. (a -> b) -> a -> b
$ \ctx_ ::: Ptr Crypto_aead_aes256gcm_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray ctx_ ::: Ptr Crypto_aead_aes256gcm_state
pd ctx_ ::: Ptr Crypto_aead_aes256gcm_state
ps Int
1
    forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_aead_aes256gcm_state
d

crypto_aead_aes256gcm_state'malloc
  :: IO Crypto_aead_aes256gcm_state
crypto_aead_aes256gcm_state'malloc :: IO Crypto_aead_aes256gcm_state
crypto_aead_aes256gcm_state'malloc = do
  ForeignPtr Crypto_aead_aes256gcm_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_aead_aes256gcm_state
finalizer_crypto_aead_aes256gcm_state ForeignPtr Crypto_aead_aes256gcm_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_aead_aes256gcm_state
-> Crypto_aead_aes256gcm_state
Crypto_aead_aes256gcm_state ForeignPtr Crypto_aead_aes256gcm_state
fp)

crypto_aead_aes256gcm_state'ptr
  :: Crypto_aead_aes256gcm_state
  -> (Ptr Crypto_aead_aes256gcm_state -> IO x)
  -> IO x
crypto_aead_aes256gcm_state'ptr :: forall x.
Crypto_aead_aes256gcm_state
-> ((ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO x) -> IO x
crypto_aead_aes256gcm_state'ptr Crypto_aead_aes256gcm_state
t (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_aead_aes256gcm_state
t) (ctx_ ::: Ptr Crypto_aead_aes256gcm_state) -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_aead_aes256gcm_state"
  finalizer_crypto_aead_aes256gcm_state
    :: FinalizerPtr Crypto_aead_aes256gcm_state

---

-- | Type-synonym for 'Crypto_sign_ed25519ph_state'
type Crypto_sign_state = Crypto_sign_ed25519ph_state

-- | Same as 'crypto_sign_ed25519ph_state'malloc'.
crypto_sign_state'malloc :: IO Crypto_sign_state
crypto_sign_state'malloc :: IO Crypto_sign_ed25519ph_state
crypto_sign_state'malloc = IO Crypto_sign_ed25519ph_state
crypto_sign_ed25519ph_state'malloc

-- | Same as 'crypto_sign_ed25519ph_state'ptr'.
crypto_sign_state'ptr
  :: Crypto_sign_state
  -> (Ptr Crypto_sign_state -> IO x)
  -> IO x
crypto_sign_state'ptr :: forall x.
Crypto_sign_ed25519ph_state
-> ((state ::: Ptr Crypto_sign_ed25519ph_state) -> IO x) -> IO x
crypto_sign_state'ptr = forall x.
Crypto_sign_ed25519ph_state
-> ((state ::: Ptr Crypto_sign_ed25519ph_state) -> IO x) -> IO x
crypto_sign_ed25519ph_state'ptr

---

newtype Crypto_sign_ed25519ph_state
  = Crypto_sign_ed25519ph_state
    (ForeignPtr Crypto_sign_ed25519ph_state)

instance Storable Crypto_sign_ed25519ph_state where
  sizeOf :: Crypto_sign_ed25519ph_state -> Int
sizeOf Crypto_sign_ed25519ph_state
_ = Int
208
{-# LINE 919 "hs/Libsodium.chs" #-}

  alignment _ = 8
{-# LINE 920 "hs/Libsodium.chs" #-}

  poke pd s = crypto_sign_ed25519ph_state'ptr s $ \ps ->
    copyArray pd ps 1
  peek :: (state ::: Ptr Crypto_sign_ed25519ph_state)
-> IO Crypto_sign_ed25519ph_state
peek state ::: Ptr Crypto_sign_ed25519ph_state
ps = do
    Crypto_sign_ed25519ph_state
d <- IO Crypto_sign_ed25519ph_state
crypto_sign_ed25519ph_state'malloc
    forall x.
Crypto_sign_ed25519ph_state
-> ((state ::: Ptr Crypto_sign_ed25519ph_state) -> IO x) -> IO x
crypto_sign_ed25519ph_state'ptr Crypto_sign_ed25519ph_state
d forall a b. (a -> b) -> a -> b
$ \state ::: Ptr Crypto_sign_ed25519ph_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray state ::: Ptr Crypto_sign_ed25519ph_state
pd state ::: Ptr Crypto_sign_ed25519ph_state
ps Int
1
    forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_sign_ed25519ph_state
d

crypto_sign_ed25519ph_state'malloc
  :: IO Crypto_sign_ed25519ph_state
crypto_sign_ed25519ph_state'malloc :: IO Crypto_sign_ed25519ph_state
crypto_sign_ed25519ph_state'malloc = do
  ForeignPtr Crypto_sign_ed25519ph_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_sign_ed25519ph_state
finalizer_crypto_sign_ed25519ph_state ForeignPtr Crypto_sign_ed25519ph_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_sign_ed25519ph_state
-> Crypto_sign_ed25519ph_state
Crypto_sign_ed25519ph_state ForeignPtr Crypto_sign_ed25519ph_state
fp)

crypto_sign_ed25519ph_state'ptr
  :: Crypto_sign_ed25519ph_state
  -> (Ptr Crypto_sign_ed25519ph_state -> IO x)
  -> IO x
crypto_sign_ed25519ph_state'ptr :: forall x.
Crypto_sign_ed25519ph_state
-> ((state ::: Ptr Crypto_sign_ed25519ph_state) -> IO x) -> IO x
crypto_sign_ed25519ph_state'ptr Crypto_sign_ed25519ph_state
t (state ::: Ptr Crypto_sign_ed25519ph_state) -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_sign_ed25519ph_state
t) (state ::: Ptr Crypto_sign_ed25519ph_state) -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_sign_ed25519ph_state"
  finalizer_crypto_sign_ed25519ph_state
    :: FinalizerPtr Crypto_sign_ed25519ph_state

---

newtype Crypto_secretstream_xchacha20poly1305_state
  = Crypto_secretstream_xchacha20poly1305_state
    (ForeignPtr Crypto_secretstream_xchacha20poly1305_state)

instance Storable Crypto_secretstream_xchacha20poly1305_state where
  sizeOf :: Crypto_secretstream_xchacha20poly1305_state -> Int
sizeOf Crypto_secretstream_xchacha20poly1305_state
_ = Int
52
{-# LINE 953 "hs/Libsodium.chs" #-}

  alignment _ = 1
{-# LINE 954 "hs/Libsodium.chs" #-}

  poke pd s = crypto_secretstream_xchacha20poly1305_state'ptr s $ \ps ->
    copyArray pd ps 1
  peek :: Ptr Crypto_secretstream_xchacha20poly1305_state
-> IO Crypto_secretstream_xchacha20poly1305_state
peek Ptr Crypto_secretstream_xchacha20poly1305_state
ps = do
    Crypto_secretstream_xchacha20poly1305_state
d <- IO Crypto_secretstream_xchacha20poly1305_state
crypto_secretstream_xchacha20poly1305_state'malloc
    forall x.
Crypto_secretstream_xchacha20poly1305_state
-> (Ptr Crypto_secretstream_xchacha20poly1305_state -> IO x)
-> IO x
crypto_secretstream_xchacha20poly1305_state'ptr Crypto_secretstream_xchacha20poly1305_state
d forall a b. (a -> b) -> a -> b
$ \Ptr Crypto_secretstream_xchacha20poly1305_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray Ptr Crypto_secretstream_xchacha20poly1305_state
pd Ptr Crypto_secretstream_xchacha20poly1305_state
ps Int
1
    forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_secretstream_xchacha20poly1305_state
d

crypto_secretstream_xchacha20poly1305_state'malloc
  :: IO Crypto_secretstream_xchacha20poly1305_state
crypto_secretstream_xchacha20poly1305_state'malloc :: IO Crypto_secretstream_xchacha20poly1305_state
crypto_secretstream_xchacha20poly1305_state'malloc = do
  ForeignPtr Crypto_secretstream_xchacha20poly1305_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_secretstream_xchacha20poly1305_state
finalizer_crypto_secretstream_xchacha20poly1305_state ForeignPtr Crypto_secretstream_xchacha20poly1305_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_secretstream_xchacha20poly1305_state
-> Crypto_secretstream_xchacha20poly1305_state
Crypto_secretstream_xchacha20poly1305_state ForeignPtr Crypto_secretstream_xchacha20poly1305_state
fp)

crypto_secretstream_xchacha20poly1305_state'ptr
  :: Crypto_secretstream_xchacha20poly1305_state
  -> (Ptr Crypto_secretstream_xchacha20poly1305_state -> IO x)
  -> IO x
crypto_secretstream_xchacha20poly1305_state'ptr :: forall x.
Crypto_secretstream_xchacha20poly1305_state
-> (Ptr Crypto_secretstream_xchacha20poly1305_state -> IO x)
-> IO x
crypto_secretstream_xchacha20poly1305_state'ptr Crypto_secretstream_xchacha20poly1305_state
t Ptr Crypto_secretstream_xchacha20poly1305_state -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_secretstream_xchacha20poly1305_state
t) Ptr Crypto_secretstream_xchacha20poly1305_state -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_secretstream_xchacha20poly1305_state"
  finalizer_crypto_secretstream_xchacha20poly1305_state
    :: FinalizerPtr Crypto_secretstream_xchacha20poly1305_state

---

-- | Type-synonym for 'Crypto_onetimeauth_poly1305_state'
type Crypto_onetimeauth_state = Crypto_onetimeauth_poly1305_state

-- | Same as 'crypto_onetimeauth_poly1305_state'malloc'.
crypto_onetimeauth_state'malloc :: IO Crypto_onetimeauth_state
crypto_onetimeauth_state'malloc :: IO Crypto_onetimeauth_poly1305_state
crypto_onetimeauth_state'malloc = IO Crypto_onetimeauth_poly1305_state
crypto_onetimeauth_poly1305_state'malloc

-- | Same as 'crypto_onetimeauth_poly1305_state'ptr'.
crypto_onetimeauth_state'ptr
  :: Crypto_onetimeauth_state
  -> (Ptr Crypto_onetimeauth_state -> IO x)
  -> IO x
crypto_onetimeauth_state'ptr :: forall x.
Crypto_onetimeauth_poly1305_state
-> ((state ::: Ptr Crypto_onetimeauth_poly1305_state) -> IO x)
-> IO x
crypto_onetimeauth_state'ptr = forall x.
Crypto_onetimeauth_poly1305_state
-> ((state ::: Ptr Crypto_onetimeauth_poly1305_state) -> IO x)
-> IO x
crypto_onetimeauth_poly1305_state'ptr

---

newtype Crypto_onetimeauth_poly1305_state
  = Crypto_onetimeauth_poly1305_state
    (ForeignPtr Crypto_onetimeauth_poly1305_state)

instance Storable Crypto_onetimeauth_poly1305_state where
  sizeOf :: Crypto_onetimeauth_poly1305_state -> Int
sizeOf Crypto_onetimeauth_poly1305_state
_ = Int
256
{-# LINE 1003 "hs/Libsodium.chs" #-}

  alignment _ = 1
{-# LINE 1004 "hs/Libsodium.chs" #-}

  poke pd s = crypto_onetimeauth_poly1305_state'ptr s $ \ps ->
    copyArray pd ps 1
  peek :: (state ::: Ptr Crypto_onetimeauth_poly1305_state)
-> IO Crypto_onetimeauth_poly1305_state
peek state ::: Ptr Crypto_onetimeauth_poly1305_state
ps = do
    Crypto_onetimeauth_poly1305_state
d <- IO Crypto_onetimeauth_poly1305_state
crypto_onetimeauth_poly1305_state'malloc
    forall x.
Crypto_onetimeauth_poly1305_state
-> ((state ::: Ptr Crypto_onetimeauth_poly1305_state) -> IO x)
-> IO x
crypto_onetimeauth_poly1305_state'ptr Crypto_onetimeauth_poly1305_state
d forall a b. (a -> b) -> a -> b
$ \state ::: Ptr Crypto_onetimeauth_poly1305_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray state ::: Ptr Crypto_onetimeauth_poly1305_state
pd state ::: Ptr Crypto_onetimeauth_poly1305_state
ps Int
1
    forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_onetimeauth_poly1305_state
d

crypto_onetimeauth_poly1305_state'malloc
  :: IO Crypto_onetimeauth_poly1305_state
crypto_onetimeauth_poly1305_state'malloc :: IO Crypto_onetimeauth_poly1305_state
crypto_onetimeauth_poly1305_state'malloc = do
  ForeignPtr Crypto_onetimeauth_poly1305_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_onetimeauth_poly1305_state
finalizer_crypto_onetimeauth_poly1305_state ForeignPtr Crypto_onetimeauth_poly1305_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_onetimeauth_poly1305_state
-> Crypto_onetimeauth_poly1305_state
Crypto_onetimeauth_poly1305_state ForeignPtr Crypto_onetimeauth_poly1305_state
fp)

crypto_onetimeauth_poly1305_state'ptr
  :: Crypto_onetimeauth_poly1305_state
  -> (Ptr Crypto_onetimeauth_poly1305_state -> IO x)
  -> IO x
crypto_onetimeauth_poly1305_state'ptr :: forall x.
Crypto_onetimeauth_poly1305_state
-> ((state ::: Ptr Crypto_onetimeauth_poly1305_state) -> IO x)
-> IO x
crypto_onetimeauth_poly1305_state'ptr Crypto_onetimeauth_poly1305_state
t (state ::: Ptr Crypto_onetimeauth_poly1305_state) -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_onetimeauth_poly1305_state
t) (state ::: Ptr Crypto_onetimeauth_poly1305_state) -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_onetimeauth_poly1305_state"
  finalizer_crypto_onetimeauth_poly1305_state
    :: FinalizerPtr Crypto_onetimeauth_poly1305_state

---

-- | Type-synonym for 'Crypto_generichash_blake2b_state'
type Crypto_generichash_state = Crypto_generichash_blake2b_state

-- | Same as 'crypto_generichash_blake2b_state'malloc'.
crypto_generichash_state'malloc :: IO Crypto_generichash_state
crypto_generichash_state'malloc :: IO Crypto_generichash_blake2b_state
crypto_generichash_state'malloc = IO Crypto_generichash_blake2b_state
crypto_generichash_blake2b_state'malloc

-- | Same as 'crypto_generichash_blake2b_state'ptr'.
crypto_generichash_state'ptr
  :: Crypto_generichash_state
  -> (Ptr Crypto_generichash_state -> IO x)
  -> IO x
crypto_generichash_state'ptr :: forall x.
Crypto_generichash_blake2b_state
-> ((state ::: Ptr Crypto_generichash_blake2b_state) -> IO x)
-> IO x
crypto_generichash_state'ptr = forall x.
Crypto_generichash_blake2b_state
-> ((state ::: Ptr Crypto_generichash_blake2b_state) -> IO x)
-> IO x
crypto_generichash_blake2b_state'ptr

---

newtype Crypto_generichash_blake2b_state
  = Crypto_generichash_blake2b_state
    (ForeignPtr Crypto_generichash_blake2b_state)

instance Storable Crypto_generichash_blake2b_state where
  sizeOf :: Crypto_generichash_blake2b_state -> Int
sizeOf Crypto_generichash_blake2b_state
_ = Int
384
{-# LINE 1053 "hs/Libsodium.chs" #-}

  alignment _ = 1
{-# LINE 1054 "hs/Libsodium.chs" #-}

  poke pd s = crypto_generichash_blake2b_state'ptr s $ \ps ->
    copyArray pd ps 1
  peek :: (state ::: Ptr Crypto_generichash_blake2b_state)
-> IO Crypto_generichash_blake2b_state
peek state ::: Ptr Crypto_generichash_blake2b_state
ps = do
    Crypto_generichash_blake2b_state
d <- IO Crypto_generichash_blake2b_state
crypto_generichash_blake2b_state'malloc
    forall x.
Crypto_generichash_blake2b_state
-> ((state ::: Ptr Crypto_generichash_blake2b_state) -> IO x)
-> IO x
crypto_generichash_blake2b_state'ptr Crypto_generichash_blake2b_state
d forall a b. (a -> b) -> a -> b
$ \state ::: Ptr Crypto_generichash_blake2b_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray state ::: Ptr Crypto_generichash_blake2b_state
pd state ::: Ptr Crypto_generichash_blake2b_state
ps Int
1
    forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_generichash_blake2b_state
d

crypto_generichash_blake2b_state'malloc :: IO Crypto_generichash_blake2b_state
crypto_generichash_blake2b_state'malloc :: IO Crypto_generichash_blake2b_state
crypto_generichash_blake2b_state'malloc = do
  ForeignPtr Crypto_generichash_blake2b_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_generichash_blake2b_state
finalizer_crypto_generichash_blake2b_state ForeignPtr Crypto_generichash_blake2b_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_generichash_blake2b_state
-> Crypto_generichash_blake2b_state
Crypto_generichash_blake2b_state ForeignPtr Crypto_generichash_blake2b_state
fp)

crypto_generichash_blake2b_state'ptr
  :: Crypto_generichash_blake2b_state
  -> (Ptr Crypto_generichash_blake2b_state -> IO x)
  -> IO x
crypto_generichash_blake2b_state'ptr :: forall x.
Crypto_generichash_blake2b_state
-> ((state ::: Ptr Crypto_generichash_blake2b_state) -> IO x)
-> IO x
crypto_generichash_blake2b_state'ptr Crypto_generichash_blake2b_state
t (state ::: Ptr Crypto_generichash_blake2b_state) -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_generichash_blake2b_state
t) (state ::: Ptr Crypto_generichash_blake2b_state) -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_generichash_blake2b_state"
  finalizer_crypto_generichash_blake2b_state
    :: FinalizerPtr Crypto_generichash_blake2b_state

---

newtype Crypto_hash_sha256_state
  = Crypto_hash_sha256_state (ForeignPtr Crypto_hash_sha256_state)

instance Storable Crypto_hash_sha256_state where
  sizeOf :: Crypto_hash_sha256_state -> Int
sizeOf Crypto_hash_sha256_state
_ = Int
104
{-# LINE 1085 "hs/Libsodium.chs" #-}

  alignment _ = 8
{-# LINE 1086 "hs/Libsodium.chs" #-}

  poke pd s = crypto_hash_sha256_state'ptr s $ \ps -> copyArray pd ps 1
  peek :: Ptr Crypto_hash_sha256_state -> IO Crypto_hash_sha256_state
peek Ptr Crypto_hash_sha256_state
ps = do Crypto_hash_sha256_state
d <- IO Crypto_hash_sha256_state
crypto_hash_sha256_state'malloc
               forall x.
Crypto_hash_sha256_state
-> (Ptr Crypto_hash_sha256_state -> IO x) -> IO x
crypto_hash_sha256_state'ptr Crypto_hash_sha256_state
d forall a b. (a -> b) -> a -> b
$ \Ptr Crypto_hash_sha256_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray Ptr Crypto_hash_sha256_state
pd Ptr Crypto_hash_sha256_state
ps Int
1
               forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_hash_sha256_state
d

crypto_hash_sha256_state'malloc :: IO Crypto_hash_sha256_state
crypto_hash_sha256_state'malloc :: IO Crypto_hash_sha256_state
crypto_hash_sha256_state'malloc = do
  ForeignPtr Crypto_hash_sha256_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_hash_sha256_state
finalizer_crypto_hash_sha256_state ForeignPtr Crypto_hash_sha256_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_hash_sha256_state -> Crypto_hash_sha256_state
Crypto_hash_sha256_state ForeignPtr Crypto_hash_sha256_state
fp)

crypto_hash_sha256_state'ptr
  :: Crypto_hash_sha256_state
  -> (Ptr Crypto_hash_sha256_state -> IO x)
  -> IO x
crypto_hash_sha256_state'ptr :: forall x.
Crypto_hash_sha256_state
-> (Ptr Crypto_hash_sha256_state -> IO x) -> IO x
crypto_hash_sha256_state'ptr Crypto_hash_sha256_state
t Ptr Crypto_hash_sha256_state -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_hash_sha256_state
t) Ptr Crypto_hash_sha256_state -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_hash_sha256_state"
  finalizer_crypto_hash_sha256_state
    :: FinalizerPtr Crypto_hash_sha256_state

---

newtype Crypto_hash_sha512_state
  = Crypto_hash_sha512_state (ForeignPtr Crypto_hash_sha512_state)

instance Storable Crypto_hash_sha512_state where
  sizeOf :: Crypto_hash_sha512_state -> Int
sizeOf Crypto_hash_sha512_state
_ = Int
208
{-# LINE 1115 "hs/Libsodium.chs" #-}

  alignment _ = 8
{-# LINE 1116 "hs/Libsodium.chs" #-}

  poke pd s = crypto_hash_sha512_state'ptr s $ \ps -> copyArray pd ps 1
  peek :: (state ::: Ptr Crypto_hash_sha512_state)
-> IO Crypto_hash_sha512_state
peek state ::: Ptr Crypto_hash_sha512_state
ps = do Crypto_hash_sha512_state
d <- IO Crypto_hash_sha512_state
crypto_hash_sha512_state'malloc
               forall x.
Crypto_hash_sha512_state
-> ((state ::: Ptr Crypto_hash_sha512_state) -> IO x) -> IO x
crypto_hash_sha512_state'ptr Crypto_hash_sha512_state
d forall a b. (a -> b) -> a -> b
$ \state ::: Ptr Crypto_hash_sha512_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray state ::: Ptr Crypto_hash_sha512_state
pd state ::: Ptr Crypto_hash_sha512_state
ps Int
1
               forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_hash_sha512_state
d

crypto_hash_sha512_state'malloc :: IO Crypto_hash_sha512_state
crypto_hash_sha512_state'malloc :: IO Crypto_hash_sha512_state
crypto_hash_sha512_state'malloc = do
  ForeignPtr Crypto_hash_sha512_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_hash_sha512_state
finalizer_crypto_hash_sha512_state ForeignPtr Crypto_hash_sha512_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_hash_sha512_state -> Crypto_hash_sha512_state
Crypto_hash_sha512_state ForeignPtr Crypto_hash_sha512_state
fp)

crypto_hash_sha512_state'ptr
  :: Crypto_hash_sha512_state
  -> (Ptr Crypto_hash_sha512_state -> IO x)
  -> IO x
crypto_hash_sha512_state'ptr :: forall x.
Crypto_hash_sha512_state
-> ((state ::: Ptr Crypto_hash_sha512_state) -> IO x) -> IO x
crypto_hash_sha512_state'ptr Crypto_hash_sha512_state
t (state ::: Ptr Crypto_hash_sha512_state) -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_hash_sha512_state
t) (state ::: Ptr Crypto_hash_sha512_state) -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_hash_sha512_state"
  finalizer_crypto_hash_sha512_state
    :: FinalizerPtr Crypto_hash_sha512_state

---

-- |Type synonym for 'Crypto_auth_hmacsha512_state'.
type Crypto_auth_hmacsha512256_state = Crypto_auth_hmacsha512_state

-- | Same as 'crypto_auth_hmacsha512_state'malloc'.
crypto_auth_hmacsha512256_state'malloc :: IO Crypto_auth_hmacsha512256_state
crypto_auth_hmacsha512256_state'malloc :: IO Crypto_auth_hmacsha512_state
crypto_auth_hmacsha512256_state'malloc = IO Crypto_auth_hmacsha512_state
crypto_auth_hmacsha512_state'malloc

-- | Same as 'crypto_auth_hmacsha512_state'ptr'.
crypto_auth_hmacsha512256_state'ptr
  :: Crypto_auth_hmacsha512256_state
  -> (Ptr Crypto_auth_hmacsha512256_state -> IO x)
  -> IO x
crypto_auth_hmacsha512256_state'ptr :: forall x.
Crypto_auth_hmacsha512_state
-> ((state ::: Ptr Crypto_auth_hmacsha512_state) -> IO x) -> IO x
crypto_auth_hmacsha512256_state'ptr = forall x.
Crypto_auth_hmacsha512_state
-> ((state ::: Ptr Crypto_auth_hmacsha512_state) -> IO x) -> IO x
crypto_auth_hmacsha512_state'ptr

---

newtype Crypto_auth_hmacsha512_state
  = Crypto_auth_hmacsha512_state (ForeignPtr Crypto_auth_hmacsha512_state)

instance Storable Crypto_auth_hmacsha512_state where
  sizeOf :: Crypto_auth_hmacsha512_state -> Int
sizeOf Crypto_auth_hmacsha512_state
_ = Int
416
{-# LINE 1161 "hs/Libsodium.chs" #-}

  alignment _ = 8
{-# LINE 1162 "hs/Libsodium.chs" #-}

  poke pd s = crypto_auth_hmacsha512_state'ptr s $ \ps -> copyArray pd ps 1
  peek :: (state ::: Ptr Crypto_auth_hmacsha512_state)
-> IO Crypto_auth_hmacsha512_state
peek state ::: Ptr Crypto_auth_hmacsha512_state
ps = do Crypto_auth_hmacsha512_state
d <- IO Crypto_auth_hmacsha512_state
crypto_auth_hmacsha512_state'malloc
               forall x.
Crypto_auth_hmacsha512_state
-> ((state ::: Ptr Crypto_auth_hmacsha512_state) -> IO x) -> IO x
crypto_auth_hmacsha512_state'ptr Crypto_auth_hmacsha512_state
d forall a b. (a -> b) -> a -> b
$ \state ::: Ptr Crypto_auth_hmacsha512_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray state ::: Ptr Crypto_auth_hmacsha512_state
pd state ::: Ptr Crypto_auth_hmacsha512_state
ps Int
1
               forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_auth_hmacsha512_state
d

crypto_auth_hmacsha512_state'malloc :: IO Crypto_auth_hmacsha512_state
crypto_auth_hmacsha512_state'malloc :: IO Crypto_auth_hmacsha512_state
crypto_auth_hmacsha512_state'malloc = do
  ForeignPtr Crypto_auth_hmacsha512_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_auth_hmacsha512_state
finalizer_crypto_auth_hmacsha512_state ForeignPtr Crypto_auth_hmacsha512_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_auth_hmacsha512_state
-> Crypto_auth_hmacsha512_state
Crypto_auth_hmacsha512_state ForeignPtr Crypto_auth_hmacsha512_state
fp)

crypto_auth_hmacsha512_state'ptr
  :: Crypto_auth_hmacsha512_state
  -> (Ptr Crypto_auth_hmacsha512_state -> IO x)
  -> IO x
crypto_auth_hmacsha512_state'ptr :: forall x.
Crypto_auth_hmacsha512_state
-> ((state ::: Ptr Crypto_auth_hmacsha512_state) -> IO x) -> IO x
crypto_auth_hmacsha512_state'ptr Crypto_auth_hmacsha512_state
t (state ::: Ptr Crypto_auth_hmacsha512_state) -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_auth_hmacsha512_state
t) (state ::: Ptr Crypto_auth_hmacsha512_state) -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_auth_hmacsha512_state"
  finalizer_crypto_auth_hmacsha512_state
    :: FinalizerPtr Crypto_auth_hmacsha512_state

---

newtype Crypto_auth_hmacsha256_state
  = Crypto_auth_hmacsha256_state (ForeignPtr Crypto_auth_hmacsha256_state)

instance Storable Crypto_auth_hmacsha256_state where
  sizeOf :: Crypto_auth_hmacsha256_state -> Int
sizeOf Crypto_auth_hmacsha256_state
_ = Int
208
{-# LINE 1191 "hs/Libsodium.chs" #-}

  alignment _ = 8
{-# LINE 1192 "hs/Libsodium.chs" #-}

  poke pd s = crypto_auth_hmacsha256_state'ptr s $ \ps -> copyArray pd ps 1
  peek :: Ptr Crypto_auth_hmacsha256_state -> IO Crypto_auth_hmacsha256_state
peek Ptr Crypto_auth_hmacsha256_state
ps = do Crypto_auth_hmacsha256_state
d <- IO Crypto_auth_hmacsha256_state
crypto_auth_hmacsha256_state'malloc
               forall x.
Crypto_auth_hmacsha256_state
-> (Ptr Crypto_auth_hmacsha256_state -> IO x) -> IO x
crypto_auth_hmacsha256_state'ptr Crypto_auth_hmacsha256_state
d forall a b. (a -> b) -> a -> b
$ \Ptr Crypto_auth_hmacsha256_state
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray Ptr Crypto_auth_hmacsha256_state
pd Ptr Crypto_auth_hmacsha256_state
ps Int
1
               forall (f :: * -> *) a. Applicative f => a -> f a
pure Crypto_auth_hmacsha256_state
d

crypto_auth_hmacsha256_state'malloc :: IO Crypto_auth_hmacsha256_state
crypto_auth_hmacsha256_state'malloc :: IO Crypto_auth_hmacsha256_state
crypto_auth_hmacsha256_state'malloc = do
  ForeignPtr Crypto_auth_hmacsha256_state
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Crypto_auth_hmacsha256_state
finalizer_crypto_auth_hmacsha256_state ForeignPtr Crypto_auth_hmacsha256_state
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Crypto_auth_hmacsha256_state
-> Crypto_auth_hmacsha256_state
Crypto_auth_hmacsha256_state ForeignPtr Crypto_auth_hmacsha256_state
fp)

crypto_auth_hmacsha256_state'ptr
  :: Crypto_auth_hmacsha256_state
  -> (Ptr Crypto_auth_hmacsha256_state -> IO x)
  -> IO x
crypto_auth_hmacsha256_state'ptr :: forall x.
Crypto_auth_hmacsha256_state
-> (Ptr Crypto_auth_hmacsha256_state -> IO x) -> IO x
crypto_auth_hmacsha256_state'ptr Crypto_auth_hmacsha256_state
t Ptr Crypto_auth_hmacsha256_state -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Crypto_auth_hmacsha256_state
t) Ptr Crypto_auth_hmacsha256_state -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_crypto_auth_hmacsha256_state"
  finalizer_crypto_auth_hmacsha256_state
    :: FinalizerPtr Crypto_auth_hmacsha256_state

---

newtype Randombytes_implementation
  = Randombytes_implementation (ForeignPtr Randombytes_implementation)

instance Storable Randombytes_implementation where
  sizeOf :: Randombytes_implementation -> Int
sizeOf Randombytes_implementation
_ = Int
48
{-# LINE 1221 "hs/Libsodium.chs" #-}

  alignment _ = 8
{-# LINE 1222 "hs/Libsodium.chs" #-}

  poke pd s = randombytes_implementation'ptr s $ \ps -> copyArray pd ps 1
  peek :: Ptr Randombytes_implementation -> IO Randombytes_implementation
peek Ptr Randombytes_implementation
ps = do Randombytes_implementation
d <- IO Randombytes_implementation
randombytes_implementation'malloc
               forall x.
Randombytes_implementation
-> (Ptr Randombytes_implementation -> IO x) -> IO x
randombytes_implementation'ptr Randombytes_implementation
d forall a b. (a -> b) -> a -> b
$ \Ptr Randombytes_implementation
pd -> forall a. Storable a => Ptr a -> Ptr a -> Int -> IO ()
copyArray Ptr Randombytes_implementation
pd Ptr Randombytes_implementation
ps Int
1
               forall (f :: * -> *) a. Applicative f => a -> f a
pure Randombytes_implementation
d

randombytes_implementation'malloc :: IO Randombytes_implementation
randombytes_implementation'malloc :: IO Randombytes_implementation
randombytes_implementation'malloc = do
  ForeignPtr Randombytes_implementation
fp <- forall a. Storable a => IO (ForeignPtr a)
mallocForeignPtr
  forall a. FinalizerPtr a -> ForeignPtr a -> IO ()
addForeignPtrFinalizer FinalizerPtr Randombytes_implementation
finalizer_randombytes_implementation ForeignPtr Randombytes_implementation
fp
  forall (f :: * -> *) a. Applicative f => a -> f a
pure (ForeignPtr Randombytes_implementation -> Randombytes_implementation
Randombytes_implementation ForeignPtr Randombytes_implementation
fp)

randombytes_implementation'ptr
  :: Randombytes_implementation
  -> (Ptr Randombytes_implementation -> IO x)
  -> IO x
randombytes_implementation'ptr :: forall x.
Randombytes_implementation
-> (Ptr Randombytes_implementation -> IO x) -> IO x
randombytes_implementation'ptr Randombytes_implementation
t Ptr Randombytes_implementation -> IO x
g = forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (coerce :: forall a b. Coercible a b => a -> b
coerce Randombytes_implementation
t) Ptr Randombytes_implementation -> IO x
g

foreign import ccall unsafe
  "hs_libsodium.h &hs_libsodium_finalizer_randombytes_implementation"
  finalizer_randombytes_implementation
    :: FinalizerPtr Randombytes_implementation

--------------------------------------------------------------------------------
-- $constants
--
-- Constants are exported in uppercase letters as type-level 'Nat's or
-- 'Symbol's, and in lowercase letters as term-level values having
-- the appropriate C types.

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_beforenm"
  crypto_aead_aes256gcm_beforenm'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_decrypt_afternm"
  crypto_aead_aes256gcm_decrypt_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_decrypt_detached_afternm"
  crypto_aead_aes256gcm_decrypt_detached_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_decrypt_detached"
  crypto_aead_aes256gcm_decrypt_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_decrypt"
  crypto_aead_aes256gcm_decrypt'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_encrypt_afternm"
  crypto_aead_aes256gcm_encrypt_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_encrypt_detached_afternm"
  crypto_aead_aes256gcm_encrypt_detached_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_encrypt_detached"
  crypto_aead_aes256gcm_encrypt_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_encrypt"
  crypto_aead_aes256gcm_encrypt'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_is_available"
  crypto_aead_aes256gcm_is_available'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h crypto_aead_aes256gcm_keygen"
  crypto_aead_aes256gcm_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_decrypt_detached"
  crypto_aead_chacha20poly1305_decrypt_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_decrypt"
  crypto_aead_chacha20poly1305_decrypt'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_encrypt_detached"
  crypto_aead_chacha20poly1305_encrypt_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_encrypt"
  crypto_aead_chacha20poly1305_encrypt'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_keygen"
  crypto_aead_chacha20poly1305_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_ietf_decrypt_detached"
  crypto_aead_chacha20poly1305_ietf_decrypt_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_ietf_decrypt"
  crypto_aead_chacha20poly1305_ietf_decrypt'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_ietf_encrypt_detached"
  crypto_aead_chacha20poly1305_ietf_encrypt_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_ietf_encrypt"
  crypto_aead_chacha20poly1305_ietf_encrypt'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_chacha20poly1305_ietf_keygen"
  crypto_aead_chacha20poly1305_ietf_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_aead_xchacha20poly1305_ietf_decrypt_detached"
  crypto_aead_xchacha20poly1305_ietf_decrypt_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_xchacha20poly1305_ietf_decrypt"
  crypto_aead_xchacha20poly1305_ietf_decrypt'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_xchacha20poly1305_ietf_encrypt_detached"
  crypto_aead_xchacha20poly1305_ietf_encrypt_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_xchacha20poly1305_ietf_encrypt"
  crypto_aead_xchacha20poly1305_ietf_encrypt'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_aead_xchacha20poly1305_ietf_keygen"
  crypto_aead_xchacha20poly1305_ietf_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha256_final"
  crypto_auth_hmacsha256_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha256_init"
  crypto_auth_hmacsha256_init'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha256_keygen"
  crypto_auth_hmacsha256_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha256"
  crypto_auth_hmacsha256'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha256_update"
  crypto_auth_hmacsha256_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha256_verify"
  crypto_auth_hmacsha256_verify'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512256_final"
  crypto_auth_hmacsha512256_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512256_init"
  crypto_auth_hmacsha512256_init'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512256_keygen"
  crypto_auth_hmacsha512256_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512256"
  crypto_auth_hmacsha512256'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512256_update"
  crypto_auth_hmacsha512256_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512256_verify"
  crypto_auth_hmacsha512256_verify'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512_final"
  crypto_auth_hmacsha512_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512_init"
  crypto_auth_hmacsha512_init'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512_keygen"
  crypto_auth_hmacsha512_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512"
  crypto_auth_hmacsha512'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512_update"
  crypto_auth_hmacsha512_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_hmacsha512_verify"
  crypto_auth_hmacsha512_verify'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_keygen"
  crypto_auth_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_auth"
  crypto_auth'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_auth_verify"
  crypto_auth_verify'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_box_detached_afternm"
  crypto_box_detached_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_detached"
  crypto_box_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_easy_afternm"
  crypto_box_easy_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_easy"
  crypto_box_easy'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_keypair"
  crypto_box_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_box_open_afternm"
  crypto_box_open_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_open_detached_afternm"
  crypto_box_open_detached_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_open_detached"
  crypto_box_open_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_open_easy_afternm"
  crypto_box_open_easy_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_open_easy"
  crypto_box_open_easy'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_open"
  crypto_box_open'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box"
  crypto_box'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_seal_open"
  crypto_box_seal_open'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_seal"
  crypto_box_seal'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_box_seed_keypair"
  crypto_box_seed_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_box_afternm"
  crypto_box_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_beforenm"
  crypto_box_beforenm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_beforenm"
  crypto_box_curve25519xchacha20poly1305_beforenm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_detached_afternm"
  crypto_box_curve25519xchacha20poly1305_detached_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_detached"
  crypto_box_curve25519xchacha20poly1305_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_easy_afternm"
  crypto_box_curve25519xchacha20poly1305_easy_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_easy"
  crypto_box_curve25519xchacha20poly1305_easy'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_keypair"
  crypto_box_curve25519xchacha20poly1305_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_open_detached_afternm"
  crypto_box_curve25519xchacha20poly1305_open_detached_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_open_detached"
  crypto_box_curve25519xchacha20poly1305_open_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_open_easy_afternm"
  crypto_box_curve25519xchacha20poly1305_open_easy_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_open_easy"
  crypto_box_curve25519xchacha20poly1305_open_easy'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_seal_open"
  crypto_box_curve25519xchacha20poly1305_seal_open'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_seal"
  crypto_box_curve25519xchacha20poly1305_seal'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xchacha20poly1305_seed_keypair"
  crypto_box_curve25519xchacha20poly1305_seed_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xsalsa20poly1305_afternm"
  crypto_box_curve25519xsalsa20poly1305_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xsalsa20poly1305_beforenm"
  crypto_box_curve25519xsalsa20poly1305_beforenm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xsalsa20poly1305_keypair"
  crypto_box_curve25519xsalsa20poly1305_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xsalsa20poly1305_open_afternm"
  crypto_box_curve25519xsalsa20poly1305_open_afternm'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xsalsa20poly1305_open"
  crypto_box_curve25519xsalsa20poly1305_open'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xsalsa20poly1305"
  crypto_box_curve25519xsalsa20poly1305'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_box_curve25519xsalsa20poly1305_seed_keypair"
  crypto_box_curve25519xsalsa20poly1305_seed_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_add"
  crypto_core_ed25519_add'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_from_hash"
  crypto_core_ed25519_from_hash'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_from_uniform"
  crypto_core_ed25519_from_uniform'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_is_valid_point"
  crypto_core_ed25519_is_valid_point'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_random"
  crypto_core_ed25519_random'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_scalar_add"
  crypto_core_ed25519_scalar_add'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_scalar_complement"
  crypto_core_ed25519_scalar_complement'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ())))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_scalar_invert"
  crypto_core_ed25519_scalar_invert'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_scalar_mul"
  crypto_core_ed25519_scalar_mul'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_scalar_negate"
  crypto_core_ed25519_scalar_negate'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ())))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_scalar_random"
  crypto_core_ed25519_scalar_random'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_scalar_reduce"
  crypto_core_ed25519_scalar_reduce'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ())))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_scalar_sub"
  crypto_core_ed25519_scalar_sub'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ed25519_sub"
  crypto_core_ed25519_sub'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_core_hchacha20"
  crypto_core_hchacha20'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_core_hsalsa20"
  crypto_core_hsalsa20'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_add"
  crypto_core_ristretto255_add'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_from_hash"
  crypto_core_ristretto255_from_hash'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_is_valid_point"
  crypto_core_ristretto255_is_valid_point'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_random"
  crypto_core_ristretto255_random'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_scalar_add"
  crypto_core_ristretto255_scalar_add'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_scalar_complement"
  crypto_core_ristretto255_scalar_complement'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ())))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_scalar_invert"
  crypto_core_ristretto255_scalar_invert'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_scalar_mul"
  crypto_core_ristretto255_scalar_mul'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_scalar_negate"
  crypto_core_ristretto255_scalar_negate'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ())))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_scalar_random"
  crypto_core_ristretto255_scalar_random'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_scalar_reduce"
  crypto_core_ristretto255_scalar_reduce'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ())))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_scalar_sub"
  crypto_core_ristretto255_scalar_sub'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h crypto_core_ristretto255_sub"
  crypto_core_ristretto255_sub'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_core_salsa2012"
  crypto_core_salsa2012'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_core_salsa208"
  crypto_core_salsa208'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_core_salsa20"
  crypto_core_salsa20'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_blake2b_final"
  crypto_generichash_blake2b_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_blake2b_init"
  crypto_generichash_blake2b_init'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (CSize -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_blake2b_init_salt_personal"
  crypto_generichash_blake2b_init_salt_personal'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (CSize -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_blake2b_keygen"
  crypto_generichash_blake2b_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_blake2b"
  crypto_generichash_blake2b'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_blake2b_salt_personal"
  crypto_generichash_blake2b_salt_personal'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_blake2b_update"
  crypto_generichash_blake2b_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_final"
  crypto_generichash_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_init"
  crypto_generichash_init'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (CSize -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_keygen"
  crypto_generichash_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_generichash"
  crypto_generichash'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_generichash_update"
  crypto_generichash_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_hash"
  crypto_hash'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_hash_sha256_final"
  crypto_hash_sha256_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_hash_sha256_init"
  crypto_hash_sha256_init'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h crypto_hash_sha256"
  crypto_hash_sha256'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_hash_sha256_update"
  crypto_hash_sha256_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_hash_sha512_final"
  crypto_hash_sha512_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_hash_sha512_init"
  crypto_hash_sha512_init'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h crypto_hash_sha512"
  crypto_hash_sha512'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_hash_sha512_update"
  crypto_hash_sha512_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_kdf_blake2b_derive_from_key"
  crypto_kdf_blake2b_derive_from_key'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (Word64 -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_kdf_derive_from_key"
  crypto_kdf_derive_from_key'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (Word64 -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_kdf_keygen"
  crypto_kdf_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_kx_client_session_keys"
  crypto_kx_client_session_keys'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_kx_keypair"
  crypto_kx_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_kx_seed_keypair"
  crypto_kx_seed_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_kx_server_session_keys"
  crypto_kx_server_session_keys'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_final"
  crypto_onetimeauth_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_init"
  crypto_onetimeauth_init'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_keygen"
  crypto_onetimeauth_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_poly1305_final"
  crypto_onetimeauth_poly1305_final'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_poly1305_init"
  crypto_onetimeauth_poly1305_init'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_poly1305_keygen"
  crypto_onetimeauth_poly1305_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_poly1305"
  crypto_onetimeauth_poly1305'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_poly1305_update"
  crypto_onetimeauth_poly1305_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_poly1305_verify"
  crypto_onetimeauth_poly1305_verify'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth"
  crypto_onetimeauth'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_update"
  crypto_onetimeauth_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_onetimeauth_verify"
  crypto_onetimeauth_verify'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_argon2id"
  crypto_pwhash_argon2id'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (CSize -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_argon2id_str_needs_rehash"
  crypto_pwhash_argon2id_str_needs_rehash'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_argon2id_str"
  crypto_pwhash_argon2id_str'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_argon2id_str_verify"
  crypto_pwhash_argon2id_str_verify'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_argon2i"
  crypto_pwhash_argon2i'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (CSize -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_argon2i_str_needs_rehash"
  crypto_pwhash_argon2i_str_needs_rehash'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_argon2i_str"
  crypto_pwhash_argon2i_str'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_argon2i_str_verify"
  crypto_pwhash_argon2i_str_verify'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash"
  crypto_pwhash'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (CSize -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_str_alg"
  crypto_pwhash_str_alg'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (C2HSImp.CULLong -> (CSize -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_str_needs_rehash"
  crypto_pwhash_str_needs_rehash'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_str"
  crypto_pwhash_str'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_str_verify"
  crypto_pwhash_str_verify'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_scryptsalsa208sha256_ll"
  crypto_pwhash_scryptsalsa208sha256_ll'_ :: ((C2HSImp.Ptr Word8) -> (CSize -> ((C2HSImp.Ptr Word8) -> (CSize -> (Word64 -> (Word32 -> (Word32 -> ((C2HSImp.Ptr Word8) -> (CSize -> (IO C2HSImp.CInt))))))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_scryptsalsa208sha256"
  crypto_pwhash_scryptsalsa208sha256'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_scryptsalsa208sha256_str_needs_rehash"
  crypto_pwhash_scryptsalsa208sha256_str_needs_rehash'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_scryptsalsa208sha256_str"
  crypto_pwhash_scryptsalsa208sha256_str'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (C2HSImp.CULLong -> (CSize -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_pwhash_scryptsalsa208sha256_str_verify"
  crypto_pwhash_scryptsalsa208sha256_str_verify'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_curve25519_base"
  crypto_scalarmult_curve25519_base'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_curve25519"
  crypto_scalarmult_curve25519'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_ed25519_base_noclamp"
  crypto_scalarmult_ed25519_base_noclamp'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_ed25519_base"
  crypto_scalarmult_ed25519_base'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_ed25519_noclamp"
  crypto_scalarmult_ed25519_noclamp'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_ed25519"
  crypto_scalarmult_ed25519'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_base"
  crypto_scalarmult_base'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult"
  crypto_scalarmult'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_ristretto255_base"
  crypto_scalarmult_ristretto255_base'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_scalarmult_ristretto255"
  crypto_scalarmult_ristretto255'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_detached"
  crypto_secretbox_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_easy"
  crypto_secretbox_easy'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_keygen"
  crypto_secretbox_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_open_detached"
  crypto_secretbox_open_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_open_easy"
  crypto_secretbox_open_easy'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_open"
  crypto_secretbox_open'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox"
  crypto_secretbox'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_xchacha20poly1305_detached"
  crypto_secretbox_xchacha20poly1305_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_xchacha20poly1305_easy"
  crypto_secretbox_xchacha20poly1305_easy'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_xchacha20poly1305_open_detached"
  crypto_secretbox_xchacha20poly1305_open_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_xchacha20poly1305_open_easy"
  crypto_secretbox_xchacha20poly1305_open_easy'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_xsalsa20poly1305_keygen"
  crypto_secretbox_xsalsa20poly1305_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_xsalsa20poly1305_open"
  crypto_secretbox_xsalsa20poly1305_open'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretbox_xsalsa20poly1305"
  crypto_secretbox_xsalsa20poly1305'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretstream_xchacha20poly1305_init_pull"
  crypto_secretstream_xchacha20poly1305_init_pull'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_secretstream_xchacha20poly1305_init_push"
  crypto_secretstream_xchacha20poly1305_init_push'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_secretstream_xchacha20poly1305_keygen"
  crypto_secretstream_xchacha20poly1305_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_secretstream_xchacha20poly1305_pull"
  crypto_secretstream_xchacha20poly1305_pull'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt)))))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretstream_xchacha20poly1305_push"
  crypto_secretstream_xchacha20poly1305_push'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (C2HSImp.CUChar -> (IO C2HSImp.CInt)))))))))

foreign import ccall safe "Libsodium.chs.h crypto_secretstream_xchacha20poly1305_rekey"
  crypto_secretstream_xchacha20poly1305_rekey'_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_shorthash_keygen"
  crypto_shorthash_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_shorthash"
  crypto_shorthash'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_shorthash_siphash24"
  crypto_shorthash_siphash24'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_shorthash_siphashx24"
  crypto_shorthash_siphashx24'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_detached"
  crypto_sign_ed25519_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_keypair"
  crypto_sign_ed25519_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_open"
  crypto_sign_ed25519_open'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_pk_to_curve25519"
  crypto_sign_ed25519_pk_to_curve25519'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519"
  crypto_sign_ed25519'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_seed_keypair"
  crypto_sign_ed25519_seed_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_sk_to_curve25519"
  crypto_sign_ed25519_sk_to_curve25519'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_sk_to_pk"
  crypto_sign_ed25519_sk_to_pk'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_sk_to_seed"
  crypto_sign_ed25519_sk_to_seed'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519_verify_detached"
  crypto_sign_ed25519_verify_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519ph_final_create"
  crypto_sign_ed25519ph_final_create'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519ph_final_verify"
  crypto_sign_ed25519ph_final_verify'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519ph_init"
  crypto_sign_ed25519ph_init'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h crypto_sign_ed25519ph_update"
  crypto_sign_ed25519ph_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_detached"
  crypto_sign_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_final_create"
  crypto_sign_final_create'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_final_verify"
  crypto_sign_final_verify'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_init"
  crypto_sign_init'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h crypto_sign_keypair"
  crypto_sign_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_sign_open"
  crypto_sign_open'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_sign"
  crypto_sign'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CULLong) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_seed_keypair"
  crypto_sign_seed_keypair'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_update"
  crypto_sign_update'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h crypto_sign_verify_detached"
  crypto_sign_verify_detached'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_chacha20_ietf_keygen"
  crypto_stream_chacha20_ietf_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_stream_chacha20_ietf"
  crypto_stream_chacha20_ietf'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_chacha20_ietf_xor_ic"
  crypto_stream_chacha20_ietf_xor_ic'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (Word32 -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_chacha20_ietf_xor"
  crypto_stream_chacha20_ietf_xor'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_chacha20_keygen"
  crypto_stream_chacha20_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_stream_chacha20"
  crypto_stream_chacha20'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_chacha20_xor_ic"
  crypto_stream_chacha20_xor_ic'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (Word64 -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_chacha20_xor"
  crypto_stream_chacha20_xor'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_keygen"
  crypto_stream_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xor"
  crypto_stream_xor'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream"
  crypto_stream'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa2012_keygen"
  crypto_stream_salsa2012_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa2012"
  crypto_stream_salsa2012'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa2012_xor"
  crypto_stream_salsa2012_xor'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa208_keygen"
  crypto_stream_salsa208_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa208"
  crypto_stream_salsa208'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa208_xor"
  crypto_stream_salsa208_xor'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa20_keygen"
  crypto_stream_salsa20_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa20"
  crypto_stream_salsa20'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa20_xor_ic"
  crypto_stream_salsa20_xor_ic'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (Word64 -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_salsa20_xor"
  crypto_stream_salsa20_xor'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xchacha20_keygen"
  crypto_stream_xchacha20_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xchacha20"
  crypto_stream_xchacha20'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xchacha20_xor_ic"
  crypto_stream_xchacha20_xor_ic'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (Word64 -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xchacha20_xor"
  crypto_stream_xchacha20_xor'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xsalsa20_keygen"
  crypto_stream_xsalsa20_keygen'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xsalsa20"
  crypto_stream_xsalsa20'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xsalsa20_xor_ic"
  crypto_stream_xsalsa20_xor_ic'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (Word64 -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Libsodium.chs.h crypto_stream_xsalsa20_xor"
  crypto_stream_xsalsa20_xor'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h crypto_verify_16"
  crypto_verify_16'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_verify_32"
  crypto_verify_32'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h crypto_verify_64"
  crypto_verify_64'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h randombytes_buf"
  randombytes_buf'_ :: ((C2HSImp.Ptr ()) -> (CSize -> (IO ())))

foreign import ccall safe "Libsodium.chs.h randombytes_buf_deterministic"
  randombytes_buf_deterministic'_ :: ((C2HSImp.Ptr ()) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h randombytes_close"
  randombytes_close'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h randombytes"
  randombytes'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (C2HSImp.CULLong -> (IO ())))

foreign import ccall safe "Libsodium.chs.h randombytes_implementation_name"
  randombytes_implementation_name'_ :: (IO (C2HSImp.Ptr C2HSImp.CChar))

foreign import ccall safe "Libsodium.chs.h randombytes_random"
  randombytes_random'_ :: (IO Word32)

foreign import ccall safe "Libsodium.chs.h randombytes_set_implementation"
  randombytes_set_implementation'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h randombytes_stir"
  randombytes_stir'_ :: (IO ())

foreign import ccall safe "Libsodium.chs.h randombytes_uniform"
  randombytes_uniform'_ :: (Word32 -> (IO Word32))

foreign import ccall safe "Libsodium.chs.h sodium_init"
  sodium_init'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_aesni"
  sodium_runtime_has_aesni'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_avx"
  sodium_runtime_has_avx'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_avx2"
  sodium_runtime_has_avx2'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_avx512f"
  sodium_runtime_has_avx512f'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_neon"
  sodium_runtime_has_neon'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_pclmul"
  sodium_runtime_has_pclmul'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_rdrand"
  sodium_runtime_has_rdrand'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_sse2"
  sodium_runtime_has_sse2'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_sse3"
  sodium_runtime_has_sse3'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_sse41"
  sodium_runtime_has_sse41'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_runtime_has_ssse3"
  sodium_runtime_has_ssse3'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Libsodium.chs.h sodium_add"
  sodium_add'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h sodium_compare"
  sodium_compare'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h sodium_increment"
  sodium_increment'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO ())))

foreign import ccall safe "Libsodium.chs.h sodium_is_zero"
  sodium_is_zero'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h sodium_pad"
  sodium_pad'_ :: ((C2HSImp.Ptr CSize) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (CSize -> (CSize -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Libsodium.chs.h sodium_sub"
  sodium_sub'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO ()))))

foreign import ccall safe "Libsodium.chs.h sodium_unpad"
  sodium_unpad'_ :: ((C2HSImp.Ptr CSize) -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (CSize -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Libsodium.chs.h sodium_base642bin"
  sodium_base642bin'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr CSize) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))))))))

foreign import ccall safe "Libsodium.chs.h sodium_base64_encoded_len"
  sodium_base64_encoded_len'_ :: (CSize -> (C2HSImp.CInt -> (IO CSize)))

foreign import ccall safe "Libsodium.chs.h sodium_bin2base64"
  sodium_bin2base64'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr C2HSImp.CChar)))))))

foreign import ccall safe "Libsodium.chs.h sodium_bin2hex"
  sodium_bin2hex'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> (IO (C2HSImp.Ptr C2HSImp.CChar))))))

foreign import ccall safe "Libsodium.chs.h sodium_hex2bin"
  sodium_hex2bin'_ :: ((C2HSImp.Ptr C2HSImp.CUChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CChar) -> (CSize -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr CSize) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CInt))))))))

foreign import ccall safe "Libsodium.chs.h sodium_allocarray"
  sodium_allocarray'_ :: (CSize -> (CSize -> (IO (C2HSImp.Ptr ()))))

foreign import ccall safe "Libsodium.chs.h sodium_free"
  sodium_free'_ :: ((C2HSImp.Ptr ()) -> (IO ()))

foreign import ccall safe "Libsodium.chs.h sodium_malloc"
  sodium_malloc'_ :: (CSize -> (IO (C2HSImp.Ptr ())))

foreign import ccall safe "Libsodium.chs.h sodium_memcmp"
  sodium_memcmp'_ :: ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Libsodium.chs.h sodium_memzero"
  sodium_memzero'_ :: ((C2HSImp.Ptr ()) -> (CSize -> (IO ())))

foreign import ccall safe "Libsodium.chs.h sodium_mlock"
  sodium_mlock'_ :: ((C2HSImp.Ptr ()) -> (CSize -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h sodium_mprotect_noaccess"
  sodium_mprotect_noaccess'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h sodium_mprotect_readonly"
  sodium_mprotect_readonly'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h sodium_mprotect_readwrite"
  sodium_mprotect_readwrite'_ :: ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))

foreign import ccall safe "Libsodium.chs.h sodium_munlock"
  sodium_munlock'_ :: ((C2HSImp.Ptr ()) -> (CSize -> (IO C2HSImp.CInt)))

foreign import ccall safe "Libsodium.chs.h sodium_stackzero"
  sodium_stackzero'_ :: (CSize -> (IO ()))