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


{-# LINE 1 "lib/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_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_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_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_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
  , Randombytes_implementation
  , randombytes_implementation'ptr
  , randombytes_implementation'malloc
  -- * Constants
  --
  -- $constants
  , module Libsodium.Constants
  ) --}
  where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp



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

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


{-# LINE 393 "lib/Libsodium.chs" #-}


{-# LINE 394 "lib/Libsodium.chs" #-}


{-# LINE 395 "lib/Libsodium.chs" #-}



{-# LINE 397 "lib/Libsodium.chs" #-}


{-# LINE 398 "lib/Libsodium.chs" #-}


{-# LINE 399 "lib/Libsodium.chs" #-}



{-# LINE 401 "lib/Libsodium.chs" #-}


{-# LINE 402 "lib/Libsodium.chs" #-}


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



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


{-# LINE 406 "lib/Libsodium.chs" #-}


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



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


{-# LINE 410 "lib/Libsodium.chs" #-}


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



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


{-# LINE 414 "lib/Libsodium.chs" #-}


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



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


{-# LINE 418 "lib/Libsodium.chs" #-}


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



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


{-# LINE 422 "lib/Libsodium.chs" #-}


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



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


{-# LINE 426 "lib/Libsodium.chs" #-}


{-# LINE 427 "lib/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 a1 a2 =
  let {a1' = castPtr a1} in
  let {a2' = id a2} in
  crypto_aead_aes256gcm_beforenm'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 444 "lib/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 445 "lib/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 446 "lib/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 447 "lib/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 448 "lib/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 449 "lib/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 450 "lib/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 451 "lib/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 452 "lib/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 453 "lib/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 454 "lib/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 456 "lib/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 457 "lib/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 458 "lib/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 459 "lib/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 460 "lib/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 462 "lib/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 463 "lib/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 464 "lib/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 465 "lib/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 466 "lib/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 468 "lib/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 469 "lib/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 470 "lib/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 471 "lib/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 472 "lib/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 474 "lib/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 475 "lib/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 476 "lib/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 477 "lib/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 478 "lib/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 479 "lib/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 481 "lib/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 482 "lib/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 483 "lib/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 484 "lib/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 485 "lib/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 486 "lib/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 488 "lib/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 489 "lib/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 490 "lib/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 491 "lib/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 492 "lib/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 493 "lib/Libsodium.chs" #-}


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

{-# LINE 495 "lib/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 496 "lib/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 497 "lib/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 499 "lib/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 500 "lib/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 501 "lib/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 502 "lib/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 503 "lib/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 504 "lib/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 505 "lib/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 506 "lib/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 507 "lib/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 508 "lib/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 509 "lib/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 510 "lib/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 511 "lib/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 512 "lib/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 513 "lib/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 514 "lib/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 515 "lib/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 517 "lib/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 518 "lib/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 519 "lib/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 520 "lib/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 521 "lib/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 522 "lib/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 523 "lib/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 524 "lib/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 525 "lib/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 526 "lib/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 527 "lib/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 528 "lib/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 529 "lib/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 530 "lib/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 531 "lib/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 532 "lib/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 533 "lib/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 534 "lib/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 535 "lib/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 536 "lib/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 538 "lib/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 539 "lib/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 540 "lib/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 541 "lib/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 542 "lib/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 543 "lib/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 544 "lib/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 545 "lib/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 546 "lib/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 547 "lib/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 548 "lib/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 549 "lib/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 550 "lib/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 551 "lib/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 553 "lib/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 555 "lib/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 557 "lib/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 558 "lib/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 559 "lib/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 560 "lib/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 561 "lib/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 562 "lib/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 563 "lib/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 564 "lib/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 565 "lib/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 566 "lib/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 567 "lib/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 568 "lib/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 569 "lib/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 571 "lib/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 572 "lib/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 573 "lib/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 575 "lib/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 576 "lib/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 577 "lib/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 578 "lib/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 579 "lib/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 580 "lib/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 581 "lib/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 583 "lib/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 584 "lib/Libsodium.chs" #-}

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

{-# LINE 585 "lib/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 586 "lib/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 587 "lib/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 589 "lib/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 591 "lib/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 592 "lib/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 593 "lib/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 594 "lib/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 596 "lib/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 597 "lib/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 598 "lib/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 599 "lib/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 601 "lib/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 603 "lib/Libsodium.chs" #-}

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

{-# LINE 604 "lib/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 606 "lib/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 607 "lib/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 608 "lib/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 609 "lib/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 611 "lib/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 612 "lib/Libsodium.chs" #-}

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

{-# LINE 613 "lib/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 615 "lib/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 616 "lib/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 617 "lib/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 618 "lib/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 619 "lib/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 620 "lib/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 622 "lib/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 623 "lib/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 624 "lib/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 626 "lib/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 627 "lib/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 628 "lib/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 629 "lib/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 630 "lib/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 631 "lib/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 632 "lib/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 633 "lib/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 635 "lib/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 636 "lib/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 637 "lib/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 638 "lib/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 639 "lib/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 641 "lib/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 642 "lib/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 643 "lib/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 644 "lib/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 645 "lib/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 647 "lib/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 648 "lib/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 649 "lib/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 650 "lib/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 651 "lib/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 652 "lib/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 654 "lib/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 655 "lib/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 657 "lib/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 658 "lib/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 660 "lib/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 661 "lib/Libsodium.chs" #-}

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

{-# LINE 662 "lib/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 663 "lib/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 664 "lib/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 665 "lib/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 666 "lib/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 668 "lib/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 669 "lib/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 670 "lib/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 671 "lib/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 673 "lib/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 674 "lib/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 675 "lib/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 677 "lib/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 678 "lib/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 679 "lib/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 680 "lib/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 681 "lib/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 682 "lib/Libsodium.chs" #-}


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

{-# LINE 684 "lib/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 685 "lib/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 686 "lib/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 687 "lib/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 689 "lib/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 690 "lib/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 691 "lib/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 692 "lib/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 693 "lib/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 694 "lib/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 695 "lib/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 696 "lib/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 697 "lib/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 698 "lib/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 700 "lib/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 701 "lib/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 702 "lib/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 703 "lib/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 705 "lib/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 706 "lib/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 707 "lib/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 708 "lib/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 709 "lib/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 710 "lib/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 711 "lib/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 712 "lib/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 713 "lib/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 714 "lib/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 716 "lib/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 717 "lib/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 718 "lib/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 719 "lib/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 720 "lib/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 721 "lib/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 722 "lib/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 723 "lib/Libsodium.chs" #-}


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

{-# LINE 725 "lib/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 726 "lib/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 727 "lib/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 729 "lib/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 730 "lib/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 731 "lib/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 732 "lib/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 733 "lib/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 734 "lib/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 735 "lib/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 736 "lib/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 737 "lib/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 738 "lib/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 740 "lib/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 741 "lib/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 742 "lib/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 743 "lib/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 745 "lib/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 746 "lib/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 747 "lib/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 748 "lib/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 750 "lib/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 751 "lib/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 752 "lib/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 754 "lib/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 755 "lib/Libsodium.chs" #-}

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

{-# LINE 756 "lib/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 757 "lib/Libsodium.chs" #-}

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

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

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

{-# LINE 759 "lib/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 760 "lib/Libsodium.chs" #-}

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

{-# LINE 761 "lib/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 762 "lib/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 =
  sodium_init'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 769 "lib/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 771 "lib/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 772 "lib/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 773 "lib/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 774 "lib/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 775 "lib/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 776 "lib/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 777 "lib/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 778 "lib/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 779 "lib/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 780 "lib/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 781 "lib/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 783 "lib/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 784 "lib/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 785 "lib/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 786 "lib/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 787 "lib/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 788 "lib/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 789 "lib/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 791 "lib/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 792 "lib/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 793 "lib/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 794 "lib/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 795 "lib/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 797 "lib/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 798 "lib/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 799 "lib/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 800 "lib/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 801 "lib/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 802 "lib/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 803 "lib/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 804 "lib/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 805 "lib/Libsodium.chs" #-}

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

{-# LINE 806 "lib/Libsodium.chs" #-}


--------------------------------------------------------------------------------
-- $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 freed from memory as soon as they become unused.
--
-- Use the @/xxx/'ptr@ function to obtain a
-- @'Ptr' Xxx@ suitable for passing to functions.
newtype Crypto_aead_aes256gcm_state
  = Crypto_aead_aes256gcm_state
    (Opaque 16 512)
  deriving newtype (Storable)

crypto_aead_aes256gcm_state'malloc
  :: IO Crypto_aead_aes256gcm_state
crypto_aead_aes256gcm_state'malloc =
  fmap Crypto_aead_aes256gcm_state opaque'malloc

crypto_aead_aes256gcm_state'ptr
  :: Crypto_aead_aes256gcm_state
  -> (Ptr Crypto_aead_aes256gcm_state -> IO x)
  -> IO x
crypto_aead_aes256gcm_state'ptr = opaque'ptr
       @Crypto_aead_aes256gcm_state

---
type Crypto_sign_state = Crypto_sign_ed25519ph_state

newtype Crypto_sign_ed25519ph_state = Crypto_sign_ed25519ph_state
  (Opaque 8
{-# LINE 841 "lib/Libsodium.chs" #-}

          208)
  deriving newtype (Storable)

crypto_sign_ed25519ph_state'ptr = opaque'ptr @Crypto_sign_ed25519ph_state
crypto_sign_ed25519ph_state'malloc = fmap Crypto_sign_ed25519ph_state opaque'malloc

---
newtype Crypto_secretstream_xchacha20poly1305_state
  = Crypto_secretstream_xchacha20poly1305_state
  (Opaque 1
{-# LINE 851 "lib/Libsodium.chs" #-}

          52)
  deriving newtype (Storable)

crypto_secretstream_xchacha20poly1305_state'ptr = opaque'ptr @Crypto_secretstream_xchacha20poly1305_state
crypto_secretstream_xchacha20poly1305_state'malloc = fmap Crypto_secretstream_xchacha20poly1305_state opaque'malloc

---
type Crypto_onetimeauth_state = Crypto_onetimeauth_poly1305_state

newtype Crypto_onetimeauth_poly1305_state = Crypto_onetimeauth_poly1305_state
  (Opaque 16 256)
  deriving newtype (Storable)

crypto_onetimeauth_poly1305_state'ptr = opaque'ptr @Crypto_onetimeauth_poly1305_state
crypto_onetimeauth_poly1305_state'malloc = fmap Crypto_onetimeauth_poly1305_state opaque'malloc

---
type Crypto_generichash_state = Crypto_generichash_blake2b_state

newtype Crypto_generichash_blake2b_state = Crypto_generichash_blake2b_state
  (Opaque 64 384)
  deriving newtype (Storable)

crypto_generichash_blake2b_state'ptr = opaque'ptr @Crypto_generichash_blake2b_state
crypto_generichash_blake2b_state'malloc = fmap Crypto_generichash_blake2b_state opaque'malloc

---
newtype Crypto_hash_sha256_state = Crypto_hash_sha256_state
  (Opaque 8
{-# LINE 880 "lib/Libsodium.chs" #-}

          104)
  deriving newtype (Storable)

crypto_hash_sha256_state'ptr = opaque'ptr @Crypto_hash_sha256_state
crypto_hash_sha256_state'malloc = fmap Crypto_hash_sha256_state opaque'malloc

---
newtype Crypto_hash_sha512_state = Crypto_hash_sha512_state
  (Opaque 8
{-# LINE 889 "lib/Libsodium.chs" #-}

          208)
  deriving newtype (Storable)

crypto_hash_sha512_state'ptr = opaque'ptr @Crypto_hash_sha512_state
crypto_hash_sha512_state'malloc = fmap Crypto_hash_sha512_state opaque'malloc

---
type Crypto_auth_hmacsha512256_state = Crypto_auth_hmacsha512_state

newtype Crypto_auth_hmacsha512_state = Crypto_auth_hmacsha512_state
  (Opaque 8
{-# LINE 900 "lib/Libsodium.chs" #-}

          416)
  deriving newtype (Storable)

crypto_auth_hmacsha512_state'ptr = opaque'ptr @Crypto_auth_hmacsha512_state
crypto_auth_hmacsha512_state'malloc = fmap Crypto_auth_hmacsha512_state opaque'malloc

---
newtype Crypto_auth_hmacsha256_state = Crypto_auth_hmacsha256_state
  (Opaque 8
{-# LINE 909 "lib/Libsodium.chs" #-}

          208)
  deriving newtype (Storable)

crypto_auth_hmacsha256_state'ptr = opaque'ptr @Crypto_auth_hmacsha256_state
crypto_auth_hmacsha256_state'malloc = fmap Crypto_auth_hmacsha256_state opaque'malloc

---
newtype Randombytes_implementation = Randombytes_implementation
  (Opaque 8
{-# LINE 918 "lib/Libsodium.chs" #-}

          48)
  deriving newtype (Storable)

randombytes_implementation'ptr = opaque'ptr @Randombytes_implementation
randombytes_implementation'malloc = fmap Randombytes_implementation opaque'malloc

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

newtype Opaque (alignment :: Nat) (size :: Nat)
  = Opaque (ForeignPtr (Opaque alignment size))

instance forall a s. (KnownNat a, KnownNat s) => Storable (Opaque a s) where
  alignment _ = fromIntegral (natVal (Proxy :: Proxy a))
  sizeOf _ = fromIntegral (natVal (Proxy :: Proxy s))
  peek ps = do
    fpd <- mallocForeignPtr
    withForeignPtr fpd $ \pd -> copyArray pd ps 1
    pure $ Opaque fpd
  poke pd (Opaque fps) =
    withForeignPtr fps $ \ps -> copyArray pd ps 1

opaque'malloc :: (KnownNat a, KnownNat s) => IO (Opaque a s)
opaque'malloc = fmap Opaque mallocForeignPtr

opaque'ptr
  :: forall o a s x
  .  Coercible o (Opaque a s)
  => o
  -> (Ptr o -> IO x)
  -> IO x
opaque'ptr o g =
  let Opaque fp = coerce o :: Opaque a s
  in withForeignPtr fp (g . castPtr)

--------------------------------------------------------------------------------
-- $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_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 ()))