packages feed

libsodium (empty) → 1.0.18.0

raw patch · 7 files changed

+1672/−0 lines, 7 filesdep +basedep +hedgehogdep +libsodium

Dependencies added: base, hedgehog, libsodium, tasty, tasty-hedgehog, tasty-hunit

Files

+ CHANGELOG.md view
@@ -0,0 +1,3 @@+# Version 1.0.18.0++* Initial version.
+ LICENSE view
@@ -0,0 +1,16 @@+ISC License++Copyright (c) Renzo Carbonara, 2020.++Permission to use, copy, modify, and/or distribute this software for any+purpose with or without fee is hereby granted, provided that the above+copyright notice and this permission notice appear in all copies.++THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.+
+ README.md view
@@ -0,0 +1,5 @@+# libsodium++Haskell bindings to+the C [libsodium](https://libsodium.gitbook.io) library.+
+ lib/Libsodium.chs view
@@ -0,0 +1,861 @@+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE KindSignatures #-}+{-# LANGUAGE PolyKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeOperators #-}++#include <sodium.h>++-- | 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_auth_hmacsha256_state+  , Crypto_auth_hmacsha512_state+  , Crypto_generichash_blake2b_state+  , Crypto_hash_sha256_state+  , Crypto_hash_sha512_state+  , Crypto_onetimeauth_poly1305_state+  , Crypto_secretstream_xchacha20poly1305_state+  , Crypto_sign_ed25519ph_state+  , Crypto_auth_hmacsha512256_state+  , Crypto_generichash_state+  , Crypto_onetimeauth_state+  , Crypto_sign_state+  , Randombytes_implementation+  -- * Constants+  --+  -- $constants+  , module Libsodium.Constants+  ) --}+  where++import Data.Proxy+import Data.Word+import Foreign.C+import Foreign.Ptr+import Foreign.Storable+import GHC.TypeLits+import Libsodium.Constants++-------------------------------------------------------------------------++{# typedef size_t CSize #}+{# default in `CSize' [size_t] fromIntegral #}+{# default out `CSize' [size_t] fromIntegral #}++{# typedef uint64_t Word64 #}+{# default in `Word64' [uint64_t] fromIntegral #}+{# default out `Word64' [uint64_t] fromIntegral #}++{# typedef uint32_t Word32 #}+{# default in `Word32' [uint32_t] fromIntegral #}+{# default out `Word32' [uint32_t] fromIntegral #}++{# typedef uint16_t Word16 #}+{# default in `Word16' [uint16_t] fromIntegral #}+{# default out `Word16' [uint16_t] fromIntegral #}++{# typedef uint8_t Word8 #}+{# default in `Word8' [uint8_t] fromIntegral #}+{# default out `Word8' [uint8_t] fromIntegral #}++{# typedef int64_t Int64 #}+{# default in `Int64' [int64_t] fromIntegral #}+{# default out `Int64' [int64_t] fromIntegral #}++{# typedef int32_t Int32 #}+{# default in `Int32' [int32_t] fromIntegral #}+{# default out `Int32' [int32_t] fromIntegral #}++{# typedef int16_t Int16 #}+{# default in `Int16' [int16_t] fromIntegral #}+{# default out `Int16' [int16_t] fromIntegral #}++{# typedef int8_t Int8 #}+{# default in `Int8' [int8_t] fromIntegral #}+{# default out `Int8' [int8_t] fromIntegral #}++-------------------------------------------------------------------------+-- $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++-------------------------------------------------------------------------++{# fun crypto_aead_aes256gcm_beforenm { castPtr `ctx_ ::: Ptr Crypto_aead_aes256gcm_state', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_decrypt_afternm { id `m ::: Ptr CUChar', id `mlen_p ::: Ptr CULLong', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', castPtr `ctx_ ::: Ptr Crypto_aead_aes256gcm_state' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_decrypt_detached_afternm { id `m ::: Ptr CUChar', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `mac ::: Ptr CUChar', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', castPtr `ctx_ ::: Ptr Crypto_aead_aes256gcm_state' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_decrypt_detached { id `m ::: Ptr CUChar', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `mac ::: Ptr CUChar', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_decrypt { id `m ::: Ptr CUChar', id `mlen_p ::: Ptr CULLong', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_encrypt_afternm { id `c ::: Ptr CUChar', id `clen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', castPtr `ctx_ ::: Ptr Crypto_aead_aes256gcm_state' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_encrypt_detached_afternm { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `maclen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', castPtr `ctx_ ::: Ptr Crypto_aead_aes256gcm_state' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_encrypt_detached { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `maclen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_encrypt { id `c ::: Ptr CUChar', id `clen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_aes256gcm_is_available { } -> `CInt' #}+{# fun crypto_aead_aes256gcm_keygen { id `k ::: Ptr CUChar' } -> `()' #}++{# fun crypto_aead_chacha20poly1305_decrypt_detached { id `m ::: Ptr CUChar', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `mac ::: Ptr CUChar', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_chacha20poly1305_decrypt { id `m ::: Ptr CUChar', id `mlen_p ::: Ptr CULLong', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_chacha20poly1305_encrypt_detached { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `maclen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_chacha20poly1305_encrypt { id `c ::: Ptr CUChar', id `clen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_chacha20poly1305_keygen { id `k ::: Ptr CUChar' } -> `()' #}++{# fun crypto_aead_chacha20poly1305_ietf_decrypt_detached { id `m ::: Ptr CUChar', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `mac ::: Ptr CUChar', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_chacha20poly1305_ietf_decrypt { id `m ::: Ptr CUChar', id `mlen_p ::: Ptr CULLong', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_chacha20poly1305_ietf_encrypt_detached { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `maclen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_chacha20poly1305_ietf_encrypt { id `c ::: Ptr CUChar', id `clen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_chacha20poly1305_ietf_keygen { id `k ::: Ptr CUChar' } -> `()' #}++{# fun crypto_aead_xchacha20poly1305_ietf_decrypt_detached { id `m ::: Ptr CUChar', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `mac ::: Ptr CUChar', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_xchacha20poly1305_ietf_decrypt { id `m ::: Ptr CUChar', id `mlen_p ::: Ptr CULLong', id `nsec ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_xchacha20poly1305_ietf_encrypt_detached { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `maclen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_xchacha20poly1305_ietf_encrypt { id `c ::: Ptr CUChar', id `clen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `nsec ::: Ptr CUChar', id `npub ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_aead_xchacha20poly1305_ietf_keygen { id `k ::: Ptr CUChar' } -> `()' #}++{# fun crypto_auth_hmacsha256_final { castPtr `state ::: Ptr Crypto_auth_hmacsha256_state', id `out ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_auth_hmacsha256_init { castPtr `state ::: Ptr Crypto_auth_hmacsha256_state', id `key ::: Ptr CUChar', id `keylen ::: CSize' } -> `CInt' #}+{# fun crypto_auth_hmacsha256_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_auth_hmacsha256 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_auth_hmacsha256_update { castPtr `state ::: Ptr Crypto_auth_hmacsha256_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}+{# fun crypto_auth_hmacsha256_verify { id `h ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_auth_hmacsha512256_final { castPtr `state ::: Ptr Crypto_auth_hmacsha512256_state', id `out ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_auth_hmacsha512256_init { castPtr `state ::: Ptr Crypto_auth_hmacsha512256_state', id `key ::: Ptr CUChar', id `keylen ::: CSize' } -> `CInt' #}+{# fun crypto_auth_hmacsha512256_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_auth_hmacsha512256 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_auth_hmacsha512256_update { castPtr `state ::: Ptr Crypto_auth_hmacsha512256_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}+{# fun crypto_auth_hmacsha512256_verify { id `h ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_auth_hmacsha512_final { castPtr `state ::: Ptr Crypto_auth_hmacsha512_state', id `out ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_auth_hmacsha512_init { castPtr `state ::: Ptr Crypto_auth_hmacsha512_state', id `key ::: Ptr CUChar', id `keylen ::: CSize' } -> `CInt' #}+{# fun crypto_auth_hmacsha512_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_auth_hmacsha512 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_auth_hmacsha512_update { castPtr `state ::: Ptr Crypto_auth_hmacsha512_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}+{# fun crypto_auth_hmacsha512_verify { id `h ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_auth_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_auth { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_auth_verify { id `h ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_box_detached_afternm { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_detached { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_easy_afternm { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_easy { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_open_afternm { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_open_detached_afternm { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_open_detached { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_open_easy_afternm { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_open_easy { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_open { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_seal_open { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_seal { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `pk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_seed_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar', id `seed ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_afternm { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_beforenm { id `k ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_box_curve25519xchacha20poly1305_beforenm { id `k ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_detached_afternm { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_detached { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_easy_afternm { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_easy { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_open_detached_afternm { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_open_detached { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_open_easy_afternm { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_open_easy { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_seal_open { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_seal { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `pk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xchacha20poly1305_seed_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar', id `seed ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xsalsa20poly1305_afternm { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xsalsa20poly1305_beforenm { id `k ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xsalsa20poly1305_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xsalsa20poly1305_open_afternm { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xsalsa20poly1305_open { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xsalsa20poly1305 { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_box_curve25519xsalsa20poly1305_seed_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar', id `seed ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_core_ed25519_add { id `r ::: Ptr CUChar', id `p ::: Ptr CUChar', id `q ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ed25519_from_hash { id `p ::: Ptr CUChar', id `h ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ed25519_from_uniform { id `p ::: Ptr CUChar', id `r ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ed25519_is_valid_point { id `p ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ed25519_random { id `p ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ed25519_scalar_add { id `z ::: Ptr CUChar', id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ed25519_scalar_complement { id `comp ::: Ptr CUChar', id `s ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ed25519_scalar_invert { id `recip ::: Ptr CUChar', id `s ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ed25519_scalar_mul { id `z ::: Ptr CUChar', id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ed25519_scalar_negate { id `neg ::: Ptr CUChar', id `s ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ed25519_scalar_random { id `r ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ed25519_scalar_reduce { id `r ::: Ptr CUChar', id `s ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ed25519_scalar_sub { id `z ::: Ptr CUChar', id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ed25519_sub { id `r ::: Ptr CUChar', id `p ::: Ptr CUChar', id `q ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_core_hchacha20 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `k ::: Ptr CUChar', id `c ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_core_hsalsa20 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `k ::: Ptr CUChar', id `c ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_core_ristretto255_add { id `r ::: Ptr CUChar', id `p ::: Ptr CUChar', id `q ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ristretto255_from_hash { id `p ::: Ptr CUChar', id `r ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ristretto255_is_valid_point { id `p ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ristretto255_random { id `p ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ristretto255_scalar_add { id `z ::: Ptr CUChar', id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ristretto255_scalar_complement { id `comp ::: Ptr CUChar', id `s ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ristretto255_scalar_invert { id `recip ::: Ptr CUChar', id `s ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_ristretto255_scalar_mul { id `z ::: Ptr CUChar', id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ristretto255_scalar_negate { id `neg ::: Ptr CUChar', id `s ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ristretto255_scalar_random { id `r ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ristretto255_scalar_reduce { id `r ::: Ptr CUChar', id `s ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ristretto255_scalar_sub { id `z ::: Ptr CUChar', id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `()' #}+{# fun crypto_core_ristretto255_sub { id `r ::: Ptr CUChar', id `p ::: Ptr CUChar', id `q ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_core_salsa2012 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `k ::: Ptr CUChar', id `c ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_salsa208 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `k ::: Ptr CUChar', id `c ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_core_salsa20 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `k ::: Ptr CUChar', id `c ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_generichash_blake2b_final { castPtr `state ::: Ptr Crypto_generichash_blake2b_state', id `out ::: Ptr CUChar', id `outlen ::: CSize' } -> `CInt' #}+{# fun crypto_generichash_blake2b_init { castPtr `state ::: Ptr Crypto_generichash_blake2b_state', id `key ::: Ptr CUChar', id `keylen ::: CSize', id `outlen ::: CSize' } -> `CInt' #}+{# fun crypto_generichash_blake2b_init_salt_personal { castPtr `state ::: Ptr Crypto_generichash_blake2b_state', id `key ::: Ptr CUChar', id `keylen ::: CSize', id `outlen ::: CSize', id `salt ::: Ptr CUChar', id `personal ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_generichash_blake2b_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_generichash_blake2b { id `out ::: Ptr CUChar', id `outlen ::: CSize', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `key ::: Ptr CUChar', id `keylen ::: CSize' } -> `CInt' #}+{# fun crypto_generichash_blake2b_salt_personal { id `out ::: Ptr CUChar', id `outlen ::: CSize', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `key ::: Ptr CUChar', id `keylen ::: CSize', id `salt ::: Ptr CUChar', id `personal ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_generichash_blake2b_update { castPtr `state ::: Ptr Crypto_generichash_blake2b_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}++{# fun crypto_generichash_final { castPtr `state ::: Ptr Crypto_generichash_state', id `out ::: Ptr CUChar', id `outlen ::: CSize' } -> `CInt' #}+{# fun crypto_generichash_init { castPtr `state ::: Ptr Crypto_generichash_state', id `key ::: Ptr CUChar', id `keylen ::: CSize', id `outlen ::: CSize' } -> `CInt' #}+{# fun crypto_generichash_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_generichash { id `out ::: Ptr CUChar', id `outlen ::: CSize', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `key ::: Ptr CUChar', id `keylen ::: CSize' } -> `CInt' #}+{# fun crypto_generichash_update { castPtr `state ::: Ptr Crypto_generichash_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}++{# fun crypto_hash { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}++{# fun crypto_hash_sha256_final { castPtr `state ::: Ptr Crypto_hash_sha256_state', id `out ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_hash_sha256_init { castPtr `state ::: Ptr Crypto_hash_sha256_state' } -> `CInt' #}+{# fun crypto_hash_sha256 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}+{# fun crypto_hash_sha256_update { castPtr `state ::: Ptr Crypto_hash_sha256_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}++{# fun crypto_hash_sha512_final { castPtr `state ::: Ptr Crypto_hash_sha512_state', id `out ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_hash_sha512_init { castPtr `state ::: Ptr Crypto_hash_sha512_state' } -> `CInt' #}+{# fun crypto_hash_sha512 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}+{# fun crypto_hash_sha512_update { castPtr `state ::: Ptr Crypto_hash_sha512_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}++{# fun crypto_kdf_blake2b_derive_from_key { id `subkey ::: Ptr CUChar', id `subkey_len ::: CSize', id `subkey_id ::: Word64', id `ctx ::: Ptr CChar', id `key ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_kdf_derive_from_key { id `subkey ::: Ptr CUChar', id `subkey_len ::: CSize', id `subkey_id ::: Word64', id `ctx ::: Ptr CChar', id `key ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_kdf_keygen { id `k ::: Ptr CUChar' } -> `()' #}++{# fun crypto_kx_client_session_keys { id `rx ::: Ptr CUChar', id `tx ::: Ptr CUChar', id `client_pk ::: Ptr CUChar', id `client_sk ::: Ptr CUChar', id `server_pk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_kx_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_kx_seed_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar', id `seed ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_kx_server_session_keys { id `rx ::: Ptr CUChar', id `tx ::: Ptr CUChar', id `server_pk ::: Ptr CUChar', id `server_sk ::: Ptr CUChar', id `client_pk ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_onetimeauth_final { castPtr `state ::: Ptr Crypto_onetimeauth_state', id `out ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_onetimeauth_init { castPtr `state ::: Ptr Crypto_onetimeauth_state', id `key ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_onetimeauth_keygen { id `k ::: Ptr CUChar' } -> `()' #}++{# fun crypto_onetimeauth_poly1305_final { castPtr `state ::: Ptr Crypto_onetimeauth_poly1305_state', id `out ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_onetimeauth_poly1305_init { castPtr `state ::: Ptr Crypto_onetimeauth_poly1305_state', id `key ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_onetimeauth_poly1305_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_onetimeauth_poly1305 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_onetimeauth_poly1305_update { castPtr `state ::: Ptr Crypto_onetimeauth_poly1305_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}+{# fun crypto_onetimeauth_poly1305_verify { id `h ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_onetimeauth { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_onetimeauth_update { castPtr `state ::: Ptr Crypto_onetimeauth_state', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong' } -> `CInt' #}+{# fun crypto_onetimeauth_verify { id `h ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_pwhash_argon2id { id `out ::: Ptr CUChar', id `outlen ::: CULLong', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `salt ::: Ptr CUChar', id `opslimit ::: CULLong', id `memlimit ::: CSize', id `alg ::: CInt' } -> `CInt' #}+{# fun crypto_pwhash_argon2id_str_needs_rehash { id `str ::: Ptr CChar', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_argon2id_str { id `out ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_argon2id_str_verify { id `str ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong' } -> `CInt' #}+{# fun crypto_pwhash_argon2i { id `out ::: Ptr CUChar', id `outlen ::: CULLong', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `salt ::: Ptr CUChar', id `opslimit ::: CULLong', id `memlimit ::: CSize', id `alg ::: CInt' } -> `CInt' #}+{# fun crypto_pwhash_argon2i_str_needs_rehash { id `str ::: Ptr CChar', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_argon2i_str { id `out ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_argon2i_str_verify { id `str ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong' } -> `CInt' #}++{# fun crypto_pwhash { id `out ::: Ptr CUChar', id `outlen ::: CULLong', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `salt ::: Ptr CUChar', id `opslimit ::: CULLong', id `memlimit ::: CSize', id `alg ::: CInt' } -> `CInt' #}+{# fun crypto_pwhash_str_alg { id `out ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `opslimit ::: CULLong', id `memlimit ::: CSize', id `alg ::: CInt' } -> `CInt' #}+{# fun crypto_pwhash_str_needs_rehash { id `str ::: Ptr CChar', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_str { id `out ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_str_verify { id `str ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong' } -> `CInt' #}++{# fun crypto_pwhash_scryptsalsa208sha256_ll { id `passwd ::: Ptr Word8', id `passwdlen ::: CSize', id `salt ::: Ptr Word8', id `saltlen ::: CSize', id `n ::: Word64', id `r ::: Word32', id `p ::: Word32', id `buf ::: Ptr Word8', id `buflen ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_scryptsalsa208sha256 { id `out ::: Ptr CUChar', id `outlen ::: CULLong', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `salt ::: Ptr CUChar', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_scryptsalsa208sha256_str_needs_rehash { id `str ::: Ptr CChar', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_scryptsalsa208sha256_str { id `out ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong', id `opslimit ::: CULLong', id `memlimit ::: CSize' } -> `CInt' #}+{# fun crypto_pwhash_scryptsalsa208sha256_str_verify { id `str ::: Ptr CChar', id `passwd ::: Ptr CChar', id `passwdlen ::: CULLong' } -> `CInt' #}++{# fun crypto_scalarmult_curve25519_base { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_scalarmult_curve25519 { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar', id `p ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_scalarmult_ed25519_base_noclamp { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_scalarmult_ed25519_base { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_scalarmult_ed25519_noclamp { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar', id `p ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_scalarmult_ed25519 { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar', id `p ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_scalarmult_base { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_scalarmult { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar', id `p ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_scalarmult_ristretto255_base { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_scalarmult_ristretto255 { id `q ::: Ptr CUChar', id `n ::: Ptr CUChar', id `p ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_secretbox_detached { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox_easy { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_secretbox_open_detached { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox_open_easy { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox_open { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_secretbox_xchacha20poly1305_detached { id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox_xchacha20poly1305_easy { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox_xchacha20poly1305_open_detached { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `mac ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox_xchacha20poly1305_open_easy { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_secretbox_xsalsa20poly1305_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_secretbox_xsalsa20poly1305_open { id `m ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretbox_xsalsa20poly1305 { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_secretstream_xchacha20poly1305_init_pull { castPtr `state ::: Ptr Crypto_secretstream_xchacha20poly1305_state', id `header ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretstream_xchacha20poly1305_init_push { castPtr `state ::: Ptr Crypto_secretstream_xchacha20poly1305_state', id `header ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_secretstream_xchacha20poly1305_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_secretstream_xchacha20poly1305_pull { castPtr `state ::: Ptr Crypto_secretstream_xchacha20poly1305_state', id `m ::: Ptr CUChar', id `mlen_p ::: Ptr CULLong', id `tag_p ::: Ptr CUChar', id `c ::: Ptr CUChar', id `clen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong' } -> `CInt' #}+{# fun crypto_secretstream_xchacha20poly1305_push { castPtr `state ::: Ptr Crypto_secretstream_xchacha20poly1305_state', id `c ::: Ptr CUChar', id `clen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `ad ::: Ptr CUChar', id `adlen ::: CULLong', id `tag ::: CUChar' } -> `CInt' #}+{# fun crypto_secretstream_xchacha20poly1305_rekey { castPtr `state ::: Ptr Crypto_secretstream_xchacha20poly1305_state' } -> `()' #}++{# fun crypto_shorthash_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_shorthash { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_shorthash_siphash24 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_shorthash_siphashx24 { id `out ::: Ptr CUChar', id `in_ ::: Ptr CUChar', id `inlen ::: CULLong', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_sign_ed25519_detached { id `sig ::: Ptr CUChar', id `siglen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519_open { id `m ::: Ptr CUChar', id `mlen_p ::: Ptr CULLong', id `sm ::: Ptr CUChar', id `smlen ::: CULLong', id `pk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519_pk_to_curve25519 { id `curve25519_pk ::: Ptr CUChar', id `ed25519_pk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519 { id `sm ::: Ptr CUChar', id `smlen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519_seed_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar', id `seed ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519_sk_to_curve25519 { id `curve25519_sk ::: Ptr CUChar', id `ed25519_sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519_sk_to_pk { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519_sk_to_seed { id `seed ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519_verify_detached { id `sig ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `pk ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_sign_ed25519ph_final_create { castPtr `state ::: Ptr Crypto_sign_ed25519ph_state', id `sig ::: Ptr CUChar', id `siglen_p ::: Ptr CULLong', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519ph_final_verify { castPtr `state ::: Ptr Crypto_sign_ed25519ph_state', id `sig ::: Ptr CUChar', id `pk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_ed25519ph_init { castPtr `state ::: Ptr Crypto_sign_ed25519ph_state' } -> `CInt' #}+{# fun crypto_sign_ed25519ph_update { castPtr `state ::: Ptr Crypto_sign_ed25519ph_state', id `m ::: Ptr CUChar', id `mlen ::: CULLong' } -> `CInt' #}++{# fun crypto_sign_detached { id `sig ::: Ptr CUChar', id `siglen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_final_create { castPtr `state ::: Ptr Crypto_sign_state', id `sig ::: Ptr CUChar', id `siglen_p ::: Ptr CULLong', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_final_verify { castPtr `state ::: Ptr Crypto_sign_state', id `sig ::: Ptr CUChar', id `pk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_init { castPtr `state ::: Ptr Crypto_sign_state' } -> `CInt' #}+{# fun crypto_sign_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_open { id `m ::: Ptr CUChar', id `mlen_p ::: Ptr CULLong', id `sm ::: Ptr CUChar', id `smlen ::: CULLong', id `pk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign { id `sm ::: Ptr CUChar', id `smlen_p ::: Ptr CULLong', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `sk ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_seed_keypair { id `pk ::: Ptr CUChar', id `sk ::: Ptr CUChar', id `seed ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_sign_update { castPtr `state ::: Ptr Crypto_sign_state', id `m ::: Ptr CUChar', id `mlen ::: CULLong' } -> `CInt' #}+{# fun crypto_sign_verify_detached { id `sig ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `pk ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_stream_chacha20_ietf_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_stream_chacha20_ietf { id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_chacha20_ietf_xor_ic { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `ic ::: Word32', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_chacha20_ietf_xor { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_chacha20_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_stream_chacha20 { id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_chacha20_xor_ic { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `ic ::: Word64', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_chacha20_xor { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_stream_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_stream_xor { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream { id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_stream_salsa2012_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_stream_salsa2012 { id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_salsa2012_xor { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_salsa208_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_stream_salsa208 { id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_salsa208_xor { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_salsa20_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_stream_salsa20 { id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_salsa20_xor_ic { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `ic ::: Word64', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_salsa20_xor { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_stream_xchacha20_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_stream_xchacha20 { id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_xchacha20_xor_ic { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `ic ::: Word64', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_xchacha20_xor { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_stream_xsalsa20_keygen { id `k ::: Ptr CUChar' } -> `()' #}+{# fun crypto_stream_xsalsa20 { id `c ::: Ptr CUChar', id `clen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_xsalsa20_xor_ic { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `ic ::: Word64', id `k ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_stream_xsalsa20_xor { id `c ::: Ptr CUChar', id `m ::: Ptr CUChar', id `mlen ::: CULLong', id `n ::: Ptr CUChar', id `k ::: Ptr CUChar' } -> `CInt' #}++{# fun crypto_verify_16 { id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_verify_32 { id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `CInt' #}+{# fun crypto_verify_64 { id `x ::: Ptr CUChar', id `y ::: Ptr CUChar' } -> `CInt' #}++{# fun randombytes_buf { castPtr `buf ::: Ptr x', id `size ::: CSize' } -> `()' #}+{# fun randombytes_buf_deterministic { castPtr `buf ::: Ptr x', id `size ::: CSize', id `seed ::: Ptr CUChar' } -> `()' #}+{# fun randombytes_close { } -> `CInt' #}+{# fun randombytes { id `buf ::: Ptr CUChar', id `buf_len ::: CULLong' } -> `()' #}+{# fun randombytes_implementation_name { } -> `CString' #}+{# fun randombytes_random { } -> `Word32' #}+{# fun randombytes_set_implementation { castPtr `impl ::: Ptr Randombytes_implementation' } -> `CInt' #}+{# fun randombytes_stir { } -> `()' #}+{# fun randombytes_uniform { id `upper_bound ::: Word32' } -> `Word32' #}++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++{# fun sodium_init { } -> `CInt' #}++{# fun sodium_runtime_has_aesni { } -> `CInt' #}+{# fun sodium_runtime_has_avx { } -> `CInt' #}+{# fun sodium_runtime_has_avx2 { } -> `CInt' #}+{# fun sodium_runtime_has_avx512f { } -> `CInt' #}+{# fun sodium_runtime_has_neon { } -> `CInt' #}+{# fun sodium_runtime_has_pclmul { } -> `CInt' #}+{# fun sodium_runtime_has_rdrand { } -> `CInt' #}+{# fun sodium_runtime_has_sse2 { } -> `CInt' #}+{# fun sodium_runtime_has_sse3 { } -> `CInt' #}+{# fun sodium_runtime_has_sse41 { } -> `CInt' #}+{# fun sodium_runtime_has_ssse3 { } -> `CInt' #}++{# fun sodium_add { id `a ::: Ptr CUChar', id `b ::: Ptr CUChar', id `len ::: CSize' } -> `()' #}+{# fun sodium_compare { id `b1_ ::: Ptr CUChar', id `b2_ ::: Ptr CUChar', id `len ::: CSize' } -> `CInt' #}+{# fun sodium_increment { id `n ::: Ptr CUChar', id `nlen ::: CSize' } -> `()' #}+{# fun sodium_is_zero { id `n ::: Ptr CUChar', id `nlen ::: CSize' } -> `CInt' #}+{# fun sodium_pad { id `padded_buflen_p ::: Ptr CSize', id `buf ::: Ptr CUChar', id `unpadded_buflen ::: CSize', id `blocksize ::: CSize', id `max_buflen ::: CSize' } -> `CInt' #}+{# fun sodium_sub { id `a ::: Ptr CUChar', id `b ::: Ptr CUChar', id `len ::: CSize' } -> `()' #}+{# fun sodium_unpad { id `unpadded_buflen_p ::: Ptr CSize', id `buf ::: Ptr CUChar', id `padded_buflen ::: CSize', id `blocksize ::: CSize' } -> `CInt' #}++{# fun sodium_base642bin { id `bin ::: Ptr CUChar', id `bin_maxlen ::: CSize', id `b64 ::: Ptr CChar', id `b64_len ::: CSize', id `ignore ::: Ptr CChar', id `bin_len ::: Ptr CSize', id `b64_end ::: Ptr (Ptr CChar)', id `variant ::: CInt' } -> `CInt' #}+{# fun sodium_base64_encoded_len { id `bin_len ::: CSize', id `variant ::: CInt' } -> `CInt' #}+{# fun sodium_bin2base64 { castPtr `b64 ::: Ptr CChar', id `b64_maxlen ::: CSize', id `bin ::: Ptr CUChar', id `bin_len ::: CSize', id `variant ::: CInt' } -> `CString' #}+{# fun sodium_bin2hex { castPtr `hex ::: Ptr CChar', id `hex_maxlen ::: CSize', id `bin ::: Ptr CUChar', id `bin_len ::: CSize' } -> `CString' #}+{# fun sodium_hex2bin { id `bin ::: Ptr CUChar', id `bin_maxlen ::: CSize', id `hex ::: Ptr CChar', id `hex_len ::: CSize', id `ignore ::: Ptr CChar', id `bin_len ::: Ptr CSize', id `hex_end ::: Ptr  (Ptr CChar)' } -> `CInt' #}++{# fun sodium_allocarray { id `count ::: CSize', id `size ::: CSize' } -> `Ptr a' castPtr #}+{# fun sodium_malloc { id `size ::: CSize' } -> `Ptr a' castPtr #}+{# fun sodium_memcmp { castPtr `b1 ::: Ptr a', castPtr `b2 ::: Ptr a', id `len ::: CSize' } -> `CInt' #}+{# fun sodium_memzero { castPtr `pnt ::: Ptr x', id `len ::: CSize' } -> `()' #}+{# fun sodium_mlock { castPtr `addr ::: Ptr x', id `len ::: CSize' } -> `CInt' #}+{# fun sodium_mprotect_noaccess { castPtr `addr ::: Ptr x' } -> `CInt' #}+{# fun sodium_mprotect_readonly { castPtr `addr ::: Ptr x' } -> `CInt' #}+{# fun sodium_mprotect_readwrite { castPtr `addr ::: Ptr x' } -> `CInt' #}+{# fun sodium_munlock { castPtr `addr ::: Ptr x', id `len ::: CSize' } -> `CInt' #}+{# fun sodium_stackzero { id `len ::: CSize' } -> `()' #}++--------------------------------------------------------------------------------+-- $types+--+-- These are types used by some of the functions in+-- "Libsodium". They are exported as opaque types.+--+-- Use 'Storable' if you need to allocate values of these types.++newtype Crypto_aead_aes256gcm_state = Crypto_aead_aes256gcm_state+  (Opaque 16 {# sizeof crypto_aead_aes256gcm_state #})+  deriving newtype (Storable)++type Crypto_sign_state = Crypto_sign_ed25519ph_state++newtype Crypto_sign_ed25519ph_state = Crypto_sign_ed25519ph_state+  (Opaque {# alignof crypto_sign_ed25519ph_state #}+          {# sizeof crypto_sign_ed25519ph_state #})+  deriving newtype (Storable)++newtype Crypto_secretstream_xchacha20poly1305_state+  = Crypto_secretstream_xchacha20poly1305_state+  (Opaque {# alignof crypto_secretstream_xchacha20poly1305_state #}+          {# sizeof crypto_secretstream_xchacha20poly1305_state #})+  deriving newtype (Storable)++type Crypto_onetimeauth_state = Crypto_onetimeauth_poly1305_state++newtype Crypto_onetimeauth_poly1305_state = Crypto_onetimeauth_poly1305_state+  (Opaque 16 {# sizeof crypto_onetimeauth_poly1305_state #})+  deriving newtype (Storable)++type Crypto_generichash_state = Crypto_generichash_blake2b_state++newtype Crypto_generichash_blake2b_state = Crypto_generichash_blake2b_state+  (Opaque 64 {# sizeof crypto_generichash_blake2b_state #})+  deriving newtype (Storable)++newtype Crypto_hash_sha256_state = Crypto_hash_sha256_state+  (Opaque {# alignof crypto_hash_sha256_state #}+          {# sizeof crypto_hash_sha256_state #})+  deriving newtype (Storable)++newtype Crypto_hash_sha512_state = Crypto_hash_sha512_state+  (Opaque {# alignof crypto_hash_sha512_state #}+          {# sizeof crypto_hash_sha512_state #})+  deriving newtype (Storable)++type Crypto_auth_hmacsha512256_state = Crypto_auth_hmacsha512_state++newtype Crypto_auth_hmacsha512_state = Crypto_auth_hmacsha512_state+  (Opaque {# alignof crypto_auth_hmacsha512_state #}+          {# sizeof crypto_auth_hmacsha512_state #})+  deriving newtype (Storable)++newtype Crypto_auth_hmacsha256_state = Crypto_auth_hmacsha256_state+  (Opaque {# alignof crypto_auth_hmacsha256_state #}+          {# sizeof crypto_auth_hmacsha256_state #})+  deriving newtype (Storable)++newtype Randombytes_implementation = Randombytes_implementation+  (Opaque {# alignof randombytes_implementation #}+          {# sizeof randombytes_implementation #})+  deriving newtype (Storable)++--------------------------------------------------------------------------------++newtype Opaque (alignment :: Nat) (size :: Nat) = Opaque (Ptr ())++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 z = Opaque <$> peek (castPtr z)+  poke z (Opaque a) = poke (castPtr z) a++--------------------------------------------------------------------------------+-- $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.
+ lib/Libsodium/Constants.hs view
@@ -0,0 +1,329 @@+{-# LANGUAGE CPP #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE KindSignatures #-}+{-# OPTIONS_HADDOCK not-home #-}+module Libsodium.Constants where++import Data.Proxy+import Foreign.C+import GHC.TypeLits++--------------------------------------------------------------------------------++#define TN(ty_name, val, ty, val_name) \+  type ty_name = (val :: Nat); \+  val_name :: ty; \+  val_name = fromIntegral (natVal (Proxy :: Proxy ty_name))++#define TS(ty_name, val, val_name) \+  type ty_name = (val :: Symbol); \+  val_name :: String; \+  val_name = symbolVal (Proxy :: Proxy ty_name)++--------------------------------------------------------------------------------+-- Numeric constants. Their types agree with the corresponding C functions.++TN(CRYPTO_AEAD_AES256GCM_ABYTES, 16, CSize, crypto_aead_aes256gcm_abytes)+TN(CRYPTO_AEAD_AES256GCM_KEYBYTES, 32, CSize, crypto_aead_aes256gcm_keybytes)+TN(CRYPTO_AEAD_AES256GCM_MESSAGEBYTES_MAX, 68719476704, CSize, crypto_aead_aes256gcm_messagebytes_max)+TN(CRYPTO_AEAD_AES256GCM_NPUBBYTES, 12, CSize, crypto_aead_aes256gcm_npubbytes)+TN(CRYPTO_AEAD_AES256GCM_NSECBYTES, 0, CSize, crypto_aead_aes256gcm_nsecbytes)+TN(CRYPTO_AEAD_AES256GCM_STATEBYTES, 512, CSize, crypto_aead_aes256gcm_statebytes)+TN(CRYPTO_AEAD_CHACHA20POLY1305_ABYTES, 16, CSize, crypto_aead_chacha20poly1305_abytes)+TN(CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES, 16, CSize, crypto_aead_chacha20poly1305_ietf_abytes)+TN(CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES, 32, CSize, crypto_aead_chacha20poly1305_ietf_keybytes)+TN(CRYPTO_AEAD_CHACHA20POLY1305_IETF_MESSAGEBYTES_MAX, 274877906880, CSize, crypto_aead_chacha20poly1305_ietf_messagebytes_max)+TN(CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES, 12, CSize, crypto_aead_chacha20poly1305_ietf_npubbytes)+TN(CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES, 0, CSize, crypto_aead_chacha20poly1305_ietf_nsecbytes)+TN(CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES, 32, CSize, crypto_aead_chacha20poly1305_keybytes)+TN(CRYPTO_AEAD_CHACHA20POLY1305_MESSAGEBYTES_MAX, 18446744073709551599, CSize, crypto_aead_chacha20poly1305_messagebytes_max)+TN(CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES, 8, CSize, crypto_aead_chacha20poly1305_npubbytes)+TN(CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES, 0, CSize, crypto_aead_chacha20poly1305_nsecbytes)+TN(CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES, 16, CSize, crypto_aead_xchacha20poly1305_ietf_abytes)+TN(CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES, 32, CSize, crypto_aead_xchacha20poly1305_ietf_keybytes)+TN(CRYPTO_AEAD_XCHACHA20POLY1305_IETF_MESSAGEBYTES_MAX, 18446744073709551599, CSize, crypto_aead_xchacha20poly1305_ietf_messagebytes_max)+TN(CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES, 24, CSize, crypto_aead_xchacha20poly1305_ietf_npubbytes)+TN(CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES, 0, CSize, crypto_aead_xchacha20poly1305_ietf_nsecbytes)+TN(CRYPTO_AUTH_BYTES, 32, CSize, crypto_auth_bytes)+TN(CRYPTO_AUTH_HMACSHA256_BYTES, 32, CSize, crypto_auth_hmacsha256_bytes)+TN(CRYPTO_AUTH_HMACSHA256_KEYBYTES, 32, CSize, crypto_auth_hmacsha256_keybytes)+TN(CRYPTO_AUTH_HMACSHA256_STATEBYTES, 208, CSize, crypto_auth_hmacsha256_statebytes)+TN(CRYPTO_AUTH_HMACSHA512256_BYTES, 32, CSize, crypto_auth_hmacsha512256_bytes)+TN(CRYPTO_AUTH_HMACSHA512256_KEYBYTES, 32, CSize, crypto_auth_hmacsha512256_keybytes)+TN(CRYPTO_AUTH_HMACSHA512256_STATEBYTES, 416, CSize, crypto_auth_hmacsha512256_statebytes)+TN(CRYPTO_AUTH_HMACSHA512_BYTES, 64, CSize, crypto_auth_hmacsha512_bytes)+TN(CRYPTO_AUTH_HMACSHA512_KEYBYTES, 32, CSize, crypto_auth_hmacsha512_keybytes)+TN(CRYPTO_AUTH_HMACSHA512_STATEBYTES, 416, CSize, crypto_auth_hmacsha512_statebytes)+TN(CRYPTO_AUTH_KEYBYTES, 32, CSize, crypto_auth_keybytes)+TN(CRYPTO_BOX_BEFORENMBYTES, 32, CSize, crypto_box_beforenmbytes)+TN(CRYPTO_BOX_BOXZEROBYTES, 16, CSize, crypto_box_boxzerobytes)+TN(CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_BEFORENMBYTES, 32, CSize, crypto_box_curve25519xchacha20poly1305_beforenmbytes)+TN(CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_MACBYTES, 16, CSize, crypto_box_curve25519xchacha20poly1305_macbytes)+TN(CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_MESSAGEBYTES_MAX, 18446744073709551599, CSize, crypto_box_curve25519xchacha20poly1305_messagebytes_max)+TN(CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_NONCEBYTES, 24, CSize, crypto_box_curve25519xchacha20poly1305_noncebytes)+TN(CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_PUBLICKEYBYTES, 32, CSize, crypto_box_curve25519xchacha20poly1305_publickeybytes)+TN(CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_SEALBYTES, 48, CSize, crypto_box_curve25519xchacha20poly1305_sealbytes)+TN(CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_SECRETKEYBYTES, 32, CSize, crypto_box_curve25519xchacha20poly1305_secretkeybytes)+TN(CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_SEEDBYTES, 32, CSize, crypto_box_curve25519xchacha20poly1305_seedbytes)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_BEFORENMBYTES, 32, CSize, crypto_box_curve25519xsalsa20poly1305_beforenmbytes)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_BOXZEROBYTES, 16, CSize, crypto_box_curve25519xsalsa20poly1305_boxzerobytes)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_MACBYTES, 16, CSize, crypto_box_curve25519xsalsa20poly1305_macbytes)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_MESSAGEBYTES_MAX, 18446744073709551599, CSize, crypto_box_curve25519xsalsa20poly1305_messagebytes_max)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_NONCEBYTES, 24, CSize, crypto_box_curve25519xsalsa20poly1305_noncebytes)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES, 32, CSize, crypto_box_curve25519xsalsa20poly1305_publickeybytes)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES, 32, CSize, crypto_box_curve25519xsalsa20poly1305_secretkeybytes)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SEEDBYTES, 32, CSize, crypto_box_curve25519xsalsa20poly1305_seedbytes)+TN(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_ZEROBYTES, 32, CSize, crypto_box_curve25519xsalsa20poly1305_zerobytes)+TN(CRYPTO_BOX_MACBYTES, 16, CSize, crypto_box_macbytes)+TN(CRYPTO_BOX_MESSAGEBYTES_MAX, 18446744073709551599, CSize, crypto_box_messagebytes_max)+TN(CRYPTO_BOX_NONCEBYTES, 24, CSize, crypto_box_noncebytes)+TN(CRYPTO_BOX_PUBLICKEYBYTES, 32, CSize, crypto_box_publickeybytes)+TN(CRYPTO_BOX_SEALBYTES, 48, CSize, crypto_box_sealbytes)+TN(CRYPTO_BOX_SECRETKEYBYTES, 32, CSize, crypto_box_secretkeybytes)+TN(CRYPTO_BOX_SEEDBYTES, 32, CSize, crypto_box_seedbytes)+TN(CRYPTO_BOX_ZEROBYTES, 32, CSize, crypto_box_zerobytes)+TN(CRYPTO_CORE_ED25519_BYTES, 32, CSize, crypto_core_ed25519_bytes)+TN(CRYPTO_CORE_ED25519_HASHBYTES, 64, CSize, crypto_core_ed25519_hashbytes)+TN(CRYPTO_CORE_ED25519_NONREDUCEDSCALARBYTES, 64, CSize, crypto_core_ed25519_nonreducedscalarbytes)+TN(CRYPTO_CORE_ED25519_SCALARBYTES, 32, CSize, crypto_core_ed25519_scalarbytes)+TN(CRYPTO_CORE_ED25519_UNIFORMBYTES, 32, CSize, crypto_core_ed25519_uniformbytes)+TN(CRYPTO_CORE_HCHACHA20_CONSTBYTES, 16, CSize, crypto_core_hchacha20_constbytes)+TN(CRYPTO_CORE_HCHACHA20_INPUTBYTES, 16, CSize, crypto_core_hchacha20_inputbytes)+TN(CRYPTO_CORE_HCHACHA20_KEYBYTES, 32, CSize, crypto_core_hchacha20_keybytes)+TN(CRYPTO_CORE_HCHACHA20_OUTPUTBYTES, 32, CSize, crypto_core_hchacha20_outputbytes)+TN(CRYPTO_CORE_HSALSA20_CONSTBYTES, 16, CSize, crypto_core_hsalsa20_constbytes)+TN(CRYPTO_CORE_HSALSA20_INPUTBYTES, 16, CSize, crypto_core_hsalsa20_inputbytes)+TN(CRYPTO_CORE_HSALSA20_KEYBYTES, 32, CSize, crypto_core_hsalsa20_keybytes)+TN(CRYPTO_CORE_HSALSA20_OUTPUTBYTES, 32, CSize, crypto_core_hsalsa20_outputbytes)+TN(CRYPTO_CORE_RISTRETTO255_BYTES, 32, CSize, crypto_core_ristretto255_bytes)+TN(CRYPTO_CORE_RISTRETTO255_HASHBYTES, 64, CSize, crypto_core_ristretto255_hashbytes)+TN(CRYPTO_CORE_RISTRETTO255_NONREDUCEDSCALARBYTES, 64, CSize, crypto_core_ristretto255_nonreducedscalarbytes)+TN(CRYPTO_CORE_RISTRETTO255_SCALARBYTES, 32, CSize, crypto_core_ristretto255_scalarbytes)+TN(CRYPTO_CORE_SALSA2012_CONSTBYTES, 16, CSize, crypto_core_salsa2012_constbytes)+TN(CRYPTO_CORE_SALSA2012_INPUTBYTES, 16, CSize, crypto_core_salsa2012_inputbytes)+TN(CRYPTO_CORE_SALSA2012_KEYBYTES, 32, CSize, crypto_core_salsa2012_keybytes)+TN(CRYPTO_CORE_SALSA2012_OUTPUTBYTES, 64, CSize, crypto_core_salsa2012_outputbytes)+TN(CRYPTO_CORE_SALSA208_CONSTBYTES, 16, CSize, crypto_core_salsa208_constbytes)+TN(CRYPTO_CORE_SALSA208_INPUTBYTES, 16, CSize, crypto_core_salsa208_inputbytes)+TN(CRYPTO_CORE_SALSA208_KEYBYTES, 32, CSize, crypto_core_salsa208_keybytes)+TN(CRYPTO_CORE_SALSA208_OUTPUTBYTES, 64, CSize, crypto_core_salsa208_outputbytes)+TN(CRYPTO_CORE_SALSA20_CONSTBYTES, 16, CSize, crypto_core_salsa20_constbytes)+TN(CRYPTO_CORE_SALSA20_INPUTBYTES, 16, CSize, crypto_core_salsa20_inputbytes)+TN(CRYPTO_CORE_SALSA20_KEYBYTES, 32, CSize, crypto_core_salsa20_keybytes)+TN(CRYPTO_CORE_SALSA20_OUTPUTBYTES, 64, CSize, crypto_core_salsa20_outputbytes)+TN(CRYPTO_GENERICHASH_BLAKE2B_BYTES, 32, CSize, crypto_generichash_blake2b_bytes)+TN(CRYPTO_GENERICHASH_BLAKE2B_BYTES_MAX, 64, CSize, crypto_generichash_blake2b_bytes_max)+TN(CRYPTO_GENERICHASH_BLAKE2B_BYTES_MIN, 16, CSize, crypto_generichash_blake2b_bytes_min)+TN(CRYPTO_GENERICHASH_BLAKE2B_KEYBYTES, 32, CSize, crypto_generichash_blake2b_keybytes)+TN(CRYPTO_GENERICHASH_BLAKE2B_KEYBYTES_MAX, 64, CSize, crypto_generichash_blake2b_keybytes_max)+TN(CRYPTO_GENERICHASH_BLAKE2B_KEYBYTES_MIN, 16, CSize, crypto_generichash_blake2b_keybytes_min)+TN(CRYPTO_GENERICHASH_BLAKE2B_PERSONALBYTES, 16, CSize, crypto_generichash_blake2b_personalbytes)+TN(CRYPTO_GENERICHASH_BLAKE2B_SALTBYTES, 16, CSize, crypto_generichash_blake2b_saltbytes)+TN(CRYPTO_GENERICHASH_BLAKE2B_STATEBYTES, 384, CSize, crypto_generichash_blake2b_statebytes)+TN(CRYPTO_GENERICHASH_BYTES, 32, CSize, crypto_generichash_bytes)+TN(CRYPTO_GENERICHASH_BYTES_MAX, 64, CSize, crypto_generichash_bytes_max)+TN(CRYPTO_GENERICHASH_BYTES_MIN, 16, CSize, crypto_generichash_bytes_min)+TN(CRYPTO_GENERICHASH_KEYBYTES, 32, CSize, crypto_generichash_keybytes)+TN(CRYPTO_GENERICHASH_KEYBYTES_MAX, 64, CSize, crypto_generichash_keybytes_max)+TN(CRYPTO_GENERICHASH_KEYBYTES_MIN, 16, CSize, crypto_generichash_keybytes_min)+TN(CRYPTO_GENERICHASH_STATEBYTES, 384, CSize, crypto_generichash_statebytes)+TN(CRYPTO_HASH_BYTES, 64, CSize, crypto_hash_bytes)+TN(CRYPTO_HASH_SHA256_BYTES, 32, CSize, crypto_hash_sha256_bytes)+TN(CRYPTO_HASH_SHA256_STATEBYTES, 104, CSize, crypto_hash_sha256_statebytes)+TN(CRYPTO_HASH_SHA512_BYTES, 64, CSize, crypto_hash_sha512_bytes)+TN(CRYPTO_HASH_SHA512_STATEBYTES, 208, CSize, crypto_hash_sha512_statebytes)+TN(CRYPTO_KDF_BLAKE2B_BYTES_MAX, 64, CSize, crypto_kdf_blake2b_bytes_max)+TN(CRYPTO_KDF_BLAKE2B_BYTES_MIN, 16, CSize, crypto_kdf_blake2b_bytes_min)+TN(CRYPTO_KDF_BLAKE2B_CONTEXTBYTES, 8, CSize, crypto_kdf_blake2b_contextbytes)+TN(CRYPTO_KDF_BLAKE2B_KEYBYTES, 32, CSize, crypto_kdf_blake2b_keybytes)+TN(CRYPTO_KDF_BYTES_MAX, 64, CSize, crypto_kdf_bytes_max)+TN(CRYPTO_KDF_BYTES_MIN, 16, CSize, crypto_kdf_bytes_min)+TN(CRYPTO_KDF_CONTEXTBYTES, 8, CSize, crypto_kdf_contextbytes)+TN(CRYPTO_KDF_KEYBYTES, 32, CSize, crypto_kdf_keybytes)+TN(CRYPTO_KX_PUBLICKEYBYTES, 32, CSize, crypto_kx_publickeybytes)+TN(CRYPTO_KX_SECRETKEYBYTES, 32, CSize, crypto_kx_secretkeybytes)+TN(CRYPTO_KX_SEEDBYTES, 32, CSize, crypto_kx_seedbytes)+TN(CRYPTO_KX_SESSIONKEYBYTES, 32, CSize, crypto_kx_sessionkeybytes)+TN(CRYPTO_ONETIMEAUTH_BYTES, 16, CSize, crypto_onetimeauth_bytes)+TN(CRYPTO_ONETIMEAUTH_KEYBYTES, 32, CSize, crypto_onetimeauth_keybytes)+TN(CRYPTO_ONETIMEAUTH_POLY1305_BYTES, 16, CSize, crypto_onetimeauth_poly1305_bytes)+TN(CRYPTO_ONETIMEAUTH_POLY1305_KEYBYTES, 32, CSize, crypto_onetimeauth_poly1305_keybytes)+TN(CRYPTO_ONETIMEAUTH_POLY1305_STATEBYTES, 256, CSize, crypto_onetimeauth_poly1305_statebytes)+TN(CRYPTO_ONETIMEAUTH_STATEBYTES, 256, CSize, crypto_onetimeauth_statebytes)+TN(CRYPTO_PWHASH_ALG_ARGON2I13, 1, CInt, crypto_pwhash_alg_argon2i13)+TN(CRYPTO_PWHASH_ALG_ARGON2ID13, 2, CInt, crypto_pwhash_alg_argon2id13)+TN(CRYPTO_PWHASH_ALG_DEFAULT, 2, CInt, crypto_pwhash_alg_default)+TN(CRYPTO_PWHASH_ARGON2I_ALG_ARGON2I13, 1, CInt, crypto_pwhash_argon2i_alg_argon2i13)+TN(CRYPTO_PWHASH_ARGON2I_BYTES_MAX, 4294967295, CSize, crypto_pwhash_argon2i_bytes_max)+TN(CRYPTO_PWHASH_ARGON2I_BYTES_MIN, 16, CSize, crypto_pwhash_argon2i_bytes_min)+TN(CRYPTO_PWHASH_ARGON2ID_ALG_ARGON2ID13, 2, CInt, crypto_pwhash_argon2id_alg_argon2id13)+TN(CRYPTO_PWHASH_ARGON2ID_BYTES_MAX, 4294967295, CSize, crypto_pwhash_argon2id_bytes_max)+TN(CRYPTO_PWHASH_ARGON2ID_BYTES_MIN, 16, CSize, crypto_pwhash_argon2id_bytes_min)+TN(CRYPTO_PWHASH_ARGON2ID_MEMLIMIT_INTERACTIVE, 67108864, CSize, crypto_pwhash_argon2id_memlimit_interactive)+TN(CRYPTO_PWHASH_ARGON2ID_MEMLIMIT_MAX, 4398046510080, CSize, crypto_pwhash_argon2id_memlimit_max)+TN(CRYPTO_PWHASH_ARGON2ID_MEMLIMIT_MIN, 8192, CSize, crypto_pwhash_argon2id_memlimit_min)+TN(CRYPTO_PWHASH_ARGON2ID_MEMLIMIT_MODERATE, 268435456, CSize, crypto_pwhash_argon2id_memlimit_moderate)+TN(CRYPTO_PWHASH_ARGON2ID_MEMLIMIT_SENSITIVE, 1073741824, CSize, crypto_pwhash_argon2id_memlimit_sensitive)+TN(CRYPTO_PWHASH_ARGON2ID_OPSLIMIT_INTERACTIVE, 2, CSize, crypto_pwhash_argon2id_opslimit_interactive)+TN(CRYPTO_PWHASH_ARGON2ID_OPSLIMIT_MAX, 4294967295, CSize, crypto_pwhash_argon2id_opslimit_max)+TN(CRYPTO_PWHASH_ARGON2ID_OPSLIMIT_MIN, 1, CSize, crypto_pwhash_argon2id_opslimit_min)+TN(CRYPTO_PWHASH_ARGON2ID_OPSLIMIT_MODERATE, 3, CSize, crypto_pwhash_argon2id_opslimit_moderate)+TN(CRYPTO_PWHASH_ARGON2ID_OPSLIMIT_SENSITIVE, 4, CSize, crypto_pwhash_argon2id_opslimit_sensitive)+TN(CRYPTO_PWHASH_ARGON2ID_PASSWD_MAX, 4294967295, CSize, crypto_pwhash_argon2id_passwd_max)+TN(CRYPTO_PWHASH_ARGON2ID_PASSWD_MIN, 0, CSize, crypto_pwhash_argon2id_passwd_min)+TN(CRYPTO_PWHASH_ARGON2ID_SALTBYTES, 16, CSize, crypto_pwhash_argon2id_saltbytes)+TN(CRYPTO_PWHASH_ARGON2ID_STRBYTES, 128, CSize, crypto_pwhash_argon2id_strbytes)+TN(CRYPTO_PWHASH_ARGON2I_MEMLIMIT_INTERACTIVE, 33554432, CSize, crypto_pwhash_argon2i_memlimit_interactive)+TN(CRYPTO_PWHASH_ARGON2I_MEMLIMIT_MAX, 4398046510080, CSize, crypto_pwhash_argon2i_memlimit_max)+TN(CRYPTO_PWHASH_ARGON2I_MEMLIMIT_MIN, 8192, CSize, crypto_pwhash_argon2i_memlimit_min)+TN(CRYPTO_PWHASH_ARGON2I_MEMLIMIT_MODERATE, 134217728, CSize, crypto_pwhash_argon2i_memlimit_moderate)+TN(CRYPTO_PWHASH_ARGON2I_MEMLIMIT_SENSITIVE, 536870912, CSize, crypto_pwhash_argon2i_memlimit_sensitive)+TN(CRYPTO_PWHASH_ARGON2I_OPSLIMIT_INTERACTIVE, 4, CSize, crypto_pwhash_argon2i_opslimit_interactive)+TN(CRYPTO_PWHASH_ARGON2I_OPSLIMIT_MAX, 4294967295, CSize, crypto_pwhash_argon2i_opslimit_max)+TN(CRYPTO_PWHASH_ARGON2I_OPSLIMIT_MIN, 3, CSize, crypto_pwhash_argon2i_opslimit_min)+TN(CRYPTO_PWHASH_ARGON2I_OPSLIMIT_MODERATE, 6, CSize, crypto_pwhash_argon2i_opslimit_moderate)+TN(CRYPTO_PWHASH_ARGON2I_OPSLIMIT_SENSITIVE, 8, CSize, crypto_pwhash_argon2i_opslimit_sensitive)+TN(CRYPTO_PWHASH_ARGON2I_PASSWD_MAX, 4294967295, CSize, crypto_pwhash_argon2i_passwd_max)+TN(CRYPTO_PWHASH_ARGON2I_PASSWD_MIN, 0, CSize, crypto_pwhash_argon2i_passwd_min)+TN(CRYPTO_PWHASH_ARGON2I_SALTBYTES, 16, CSize, crypto_pwhash_argon2i_saltbytes)+TN(CRYPTO_PWHASH_ARGON2I_STRBYTES, 128, CSize, crypto_pwhash_argon2i_strbytes)+TN(CRYPTO_PWHASH_BYTES_MAX, 4294967295, CSize, crypto_pwhash_bytes_max)+TN(CRYPTO_PWHASH_BYTES_MIN, 16, CSize, crypto_pwhash_bytes_min)+TN(CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE, 67108864, CSize, crypto_pwhash_memlimit_interactive)+TN(CRYPTO_PWHASH_MEMLIMIT_MAX, 4398046510080, CSize, crypto_pwhash_memlimit_max)+TN(CRYPTO_PWHASH_MEMLIMIT_MIN, 8192, CSize, crypto_pwhash_memlimit_min)+TN(CRYPTO_PWHASH_MEMLIMIT_MODERATE, 268435456, CSize, crypto_pwhash_memlimit_moderate)+TN(CRYPTO_PWHASH_MEMLIMIT_SENSITIVE, 1073741824, CSize, crypto_pwhash_memlimit_sensitive)+TN(CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, 2, CSize, crypto_pwhash_opslimit_interactive)+TN(CRYPTO_PWHASH_OPSLIMIT_MAX, 4294967295, CSize, crypto_pwhash_opslimit_max)+TN(CRYPTO_PWHASH_OPSLIMIT_MIN, 1, CSize, crypto_pwhash_opslimit_min)+TN(CRYPTO_PWHASH_OPSLIMIT_MODERATE, 3, CSize, crypto_pwhash_opslimit_moderate)+TN(CRYPTO_PWHASH_OPSLIMIT_SENSITIVE, 4, CSize, crypto_pwhash_opslimit_sensitive)+TN(CRYPTO_PWHASH_PASSWD_MAX, 4294967295, CSize, crypto_pwhash_passwd_max)+TN(CRYPTO_PWHASH_PASSWD_MIN, 0, CSize, crypto_pwhash_passwd_min)+TN(CRYPTO_PWHASH_SALTBYTES, 16, CSize, crypto_pwhash_saltbytes)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_BYTES_MAX, 137438953440, CSize, crypto_pwhash_scryptsalsa208sha256_bytes_max)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_BYTES_MIN, 16, CSize, crypto_pwhash_scryptsalsa208sha256_bytes_min)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE, 16777216, CSize, crypto_pwhash_scryptsalsa208sha256_memlimit_interactive)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_MAX, 68719476736, CSize, crypto_pwhash_scryptsalsa208sha256_memlimit_max)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_MIN, 16777216, CSize, crypto_pwhash_scryptsalsa208sha256_memlimit_min)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE, 1073741824, CSize, crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE, 524288, CSize, crypto_pwhash_scryptsalsa208sha256_opslimit_interactive)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_MAX, 4294967295, CSize, crypto_pwhash_scryptsalsa208sha256_opslimit_max)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_MIN, 32768, CSize, crypto_pwhash_scryptsalsa208sha256_opslimit_min)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE, 33554432, CSize, crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_PASSWD_MAX, 18446744073709551615, CSize, crypto_pwhash_scryptsalsa208sha256_passwd_max)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_PASSWD_MIN, 0, CSize, crypto_pwhash_scryptsalsa208sha256_passwd_min)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES, 32, CSize, crypto_pwhash_scryptsalsa208sha256_saltbytes)+TN(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRBYTES, 102, CSize, crypto_pwhash_scryptsalsa208sha256_strbytes)+TN(CRYPTO_PWHASH_STRBYTES, 128, CSize, crypto_pwhash_strbytes)+TN(CRYPTO_SCALARMULT_BYTES, 32, CSize, crypto_scalarmult_bytes)+TN(CRYPTO_SCALARMULT_CURVE25519_BYTES, 32, CSize, crypto_scalarmult_curve25519_bytes)+TN(CRYPTO_SCALARMULT_CURVE25519_SCALARBYTES, 32, CSize, crypto_scalarmult_curve25519_scalarbytes)+TN(CRYPTO_SCALARMULT_ED25519_BYTES, 32, CSize, crypto_scalarmult_ed25519_bytes)+TN(CRYPTO_SCALARMULT_ED25519_SCALARBYTES, 32, CSize, crypto_scalarmult_ed25519_scalarbytes)+TN(CRYPTO_SCALARMULT_RISTRETTO255_BYTES, 32, CSize, crypto_scalarmult_ristretto255_bytes)+TN(CRYPTO_SCALARMULT_RISTRETTO255_SCALARBYTES, 32, CSize, crypto_scalarmult_ristretto255_scalarbytes)+TN(CRYPTO_SCALARMULT_SCALARBYTES, 32, CSize, crypto_scalarmult_scalarbytes)+TN(CRYPTO_SECRETBOX_BOXZEROBYTES, 16, CSize, crypto_secretbox_boxzerobytes)+TN(CRYPTO_SECRETBOX_KEYBYTES, 32, CSize, crypto_secretbox_keybytes)+TN(CRYPTO_SECRETBOX_MACBYTES, 16, CSize, crypto_secretbox_macbytes)+TN(CRYPTO_SECRETBOX_MESSAGEBYTES_MAX, 18446744073709551599, CSize, crypto_secretbox_messagebytes_max)+TN(CRYPTO_SECRETBOX_NONCEBYTES, 24, CSize, crypto_secretbox_noncebytes)+TN(CRYPTO_SECRETBOX_XCHACHA20POLY1305_KEYBYTES, 32, CSize, crypto_secretbox_xchacha20poly1305_keybytes)+TN(CRYPTO_SECRETBOX_XCHACHA20POLY1305_MACBYTES, 16, CSize, crypto_secretbox_xchacha20poly1305_macbytes)+TN(CRYPTO_SECRETBOX_XCHACHA20POLY1305_MESSAGEBYTES_MAX, 18446744073709551599, CSize, crypto_secretbox_xchacha20poly1305_messagebytes_max)+TN(CRYPTO_SECRETBOX_XCHACHA20POLY1305_NONCEBYTES, 24, CSize, crypto_secretbox_xchacha20poly1305_noncebytes)+TN(CRYPTO_SECRETBOX_XSALSA20POLY1305_BOXZEROBYTES, 16, CSize, crypto_secretbox_xsalsa20poly1305_boxzerobytes)+TN(CRYPTO_SECRETBOX_XSALSA20POLY1305_KEYBYTES, 32, CSize, crypto_secretbox_xsalsa20poly1305_keybytes)+TN(CRYPTO_SECRETBOX_XSALSA20POLY1305_MACBYTES, 16, CSize, crypto_secretbox_xsalsa20poly1305_macbytes)+TN(CRYPTO_SECRETBOX_XSALSA20POLY1305_MESSAGEBYTES_MAX, 18446744073709551599, CSize, crypto_secretbox_xsalsa20poly1305_messagebytes_max)+TN(CRYPTO_SECRETBOX_XSALSA20POLY1305_NONCEBYTES, 24, CSize, crypto_secretbox_xsalsa20poly1305_noncebytes)+TN(CRYPTO_SECRETBOX_XSALSA20POLY1305_ZEROBYTES, 32, CSize, crypto_secretbox_xsalsa20poly1305_zerobytes)+TN(CRYPTO_SECRETBOX_ZEROBYTES, 32, CSize, crypto_secretbox_zerobytes)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES, 17, CSize, crypto_secretstream_xchacha20poly1305_abytes)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES, 24, CSize, crypto_secretstream_xchacha20poly1305_headerbytes)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES, 32, CSize, crypto_secretstream_xchacha20poly1305_keybytes)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX, 274877906816, CSize, crypto_secretstream_xchacha20poly1305_messagebytes_max)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_STATEBYTES, 52, CSize, crypto_secretstream_xchacha20poly1305_statebytes)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL, 3, CUChar, crypto_secretstream_xchacha20poly1305_tag_final)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE, 0, CUChar, crypto_secretstream_xchacha20poly1305_tag_message)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH, 1, CUChar, crypto_secretstream_xchacha20poly1305_tag_push)+TN(CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY, 2, CUChar, crypto_secretstream_xchacha20poly1305_tag_rekey)+TN(CRYPTO_SHORTHASH_BYTES, 8, CSize, crypto_shorthash_bytes)+TN(CRYPTO_SHORTHASH_KEYBYTES, 16, CSize, crypto_shorthash_keybytes)+TN(CRYPTO_SHORTHASH_SIPHASH24_BYTES, 8, CSize, crypto_shorthash_siphash24_bytes)+TN(CRYPTO_SHORTHASH_SIPHASH24_KEYBYTES, 16, CSize, crypto_shorthash_siphash24_keybytes)+TN(CRYPTO_SHORTHASH_SIPHASHX24_BYTES, 16, CSize, crypto_shorthash_siphashx24_bytes)+TN(CRYPTO_SHORTHASH_SIPHASHX24_KEYBYTES, 16, CSize, crypto_shorthash_siphashx24_keybytes)+TN(CRYPTO_SIGN_BYTES, 64, CSize, crypto_sign_bytes)+TN(CRYPTO_SIGN_ED25519_BYTES, 64, CSize, crypto_sign_ed25519_bytes)+TN(CRYPTO_SIGN_ED25519_MESSAGEBYTES_MAX, 18446744073709551551, CSize, crypto_sign_ed25519_messagebytes_max)+TN(CRYPTO_SIGN_ED25519PH_STATEBYTES, 208, CSize, crypto_sign_ed25519ph_statebytes)+TN(CRYPTO_SIGN_ED25519_PUBLICKEYBYTES, 32, CSize, crypto_sign_ed25519_publickeybytes)+TN(CRYPTO_SIGN_ED25519_SECRETKEYBYTES, 64, CSize, crypto_sign_ed25519_secretkeybytes)+TN(CRYPTO_SIGN_ED25519_SEEDBYTES, 32, CSize, crypto_sign_ed25519_seedbytes)+TN(CRYPTO_SIGN_MESSAGEBYTES_MAX, 18446744073709551551, CSize, crypto_sign_messagebytes_max)+TN(CRYPTO_SIGN_PUBLICKEYBYTES, 32, CSize, crypto_sign_publickeybytes)+TN(CRYPTO_SIGN_SECRETKEYBYTES, 64, CSize, crypto_sign_secretkeybytes)+TN(CRYPTO_SIGN_SEEDBYTES, 32, CSize, crypto_sign_seedbytes)+TN(CRYPTO_SIGN_STATEBYTES, 208, CSize, crypto_sign_statebytes)+TN(CRYPTO_STREAM_CHACHA20_IETF_KEYBYTES, 32, CSize, crypto_stream_chacha20_ietf_keybytes)+TN(CRYPTO_STREAM_CHACHA20_IETF_MESSAGEBYTES_MAX, 274877906944, CSize, crypto_stream_chacha20_ietf_messagebytes_max)+TN(CRYPTO_STREAM_CHACHA20_IETF_NONCEBYTES, 12, CSize, crypto_stream_chacha20_ietf_noncebytes)+TN(CRYPTO_STREAM_CHACHA20_KEYBYTES, 32, CSize, crypto_stream_chacha20_keybytes)+TN(CRYPTO_STREAM_CHACHA20_MESSAGEBYTES_MAX, 18446744073709551615, CSize, crypto_stream_chacha20_messagebytes_max)+TN(CRYPTO_STREAM_CHACHA20_NONCEBYTES, 8, CSize, crypto_stream_chacha20_noncebytes)+TN(CRYPTO_STREAM_KEYBYTES, 32, CSize, crypto_stream_keybytes)+TN(CRYPTO_STREAM_MESSAGEBYTES_MAX, 18446744073709551615, CSize, crypto_stream_messagebytes_max)+TN(CRYPTO_STREAM_NONCEBYTES, 24, CSize, crypto_stream_noncebytes)+TN(CRYPTO_STREAM_SALSA2012_KEYBYTES, 32, CSize, crypto_stream_salsa2012_keybytes)+TN(CRYPTO_STREAM_SALSA2012_MESSAGEBYTES_MAX, 18446744073709551615, CSize, crypto_stream_salsa2012_messagebytes_max)+TN(CRYPTO_STREAM_SALSA2012_NONCEBYTES, 8, CSize, crypto_stream_salsa2012_noncebytes)+TN(CRYPTO_STREAM_SALSA208_KEYBYTES, 32, CSize, crypto_stream_salsa208_keybytes)+TN(CRYPTO_STREAM_SALSA208_MESSAGEBYTES_MAX, 18446744073709551615, CSize, crypto_stream_salsa208_messagebytes_max)+TN(CRYPTO_STREAM_SALSA208_NONCEBYTES, 8, CSize, crypto_stream_salsa208_noncebytes)+TN(CRYPTO_STREAM_SALSA20_KEYBYTES, 32, CSize, crypto_stream_salsa20_keybytes)+TN(CRYPTO_STREAM_SALSA20_MESSAGEBYTES_MAX, 18446744073709551615, CSize, crypto_stream_salsa20_messagebytes_max)+TN(CRYPTO_STREAM_SALSA20_NONCEBYTES, 8, CSize, crypto_stream_salsa20_noncebytes)+TN(CRYPTO_STREAM_XCHACHA20_KEYBYTES, 32, CSize, crypto_stream_xchacha20_keybytes)+TN(CRYPTO_STREAM_XCHACHA20_MESSAGEBYTES_MAX, 18446744073709551615, CSize, crypto_stream_xchacha20_messagebytes_max)+TN(CRYPTO_STREAM_XCHACHA20_NONCEBYTES, 24, CSize, crypto_stream_xchacha20_noncebytes)+TN(CRYPTO_STREAM_XSALSA20_KEYBYTES, 32, CSize, crypto_stream_xsalsa20_keybytes)+TN(CRYPTO_STREAM_XSALSA20_MESSAGEBYTES_MAX, 18446744073709551615, CSize, crypto_stream_xsalsa20_messagebytes_max)+TN(CRYPTO_STREAM_XSALSA20_NONCEBYTES, 24, CSize, crypto_stream_xsalsa20_noncebytes)+TN(CRYPTO_VERIFY_16_BYTES, 16, CSize, crypto_verify_16_bytes)+TN(CRYPTO_VERIFY_32_BYTES, 32, CSize, crypto_verify_32_bytes)+TN(CRYPTO_VERIFY_64_BYTES, 64, CSize, crypto_verify_64_bytes)+TN(RANDOMBYTES_SEEDBYTES, 32, CSize, randombytes_seedbytes)+TN(SODIUM_LIBRARY_MINIMAL, 0, CInt, sodium_library_minimal)+TN(SODIUM_LIBRARY_VERSION_MAJOR, 10, CInt, sodium_library_version_major)+TN(SODIUM_LIBRARY_VERSION_MINOR, 3, CInt, sodium_library_version_minor)++-- These have no corresponding C functions+TN(SODIUM_BASE64_VARIANT_ORIGINAL, 1, CInt, sodium_base64_variant_original)+TN(SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING, 3, CInt, sodium_base64_variant_original_no_padding)+TN(SODIUM_BASE64_VARIANT_URLSAFE, 5, CInt, sodium_base64_variant_urlsafe)+TN(SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING, 7, CInt, sodium_base64_variant_urlsafe_no_padding)++--------------------------------------------------------------------------------+-- String constants++TS(CRYPTO_AUTH_PRIMITIVE, "hmacsha512256", crypto_auth_primitive)+TS(CRYPTO_BOX_PRIMITIVE, "curve25519xsalsa20poly1305", crypto_box_primitive)+TS(CRYPTO_GENERICHASH_PRIMITIVE, "blake2b", crypto_generichash_primitive)+TS(CRYPTO_HASH_PRIMITIVE, "sha512", crypto_hash_primitive)+TS(CRYPTO_KDF_PRIMITIVE, "blake2b", crypto_kdf_primitive)+TS(CRYPTO_KX_PRIMITIVE, "x25519blake2b", crypto_kx_primitive)+TS(CRYPTO_ONETIMEAUTH_PRIMITIVE, "poly1305", crypto_onetimeauth_primitive)+TS(CRYPTO_PWHASH_ARGON2ID_STRPREFIX, "$argon2id$", crypto_pwhash_argon2id_strprefix)+TS(CRYPTO_PWHASH_ARGON2I_STRPREFIX, "$argon2i$", crypto_pwhash_argon2i_strprefix)+TS(CRYPTO_PWHASH_PRIMITIVE, "argon2i", crypto_pwhash_primitive)+TS(CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX, "$7$", crypto_pwhash_scryptsalsa208sha256_strprefix)+TS(CRYPTO_PWHASH_STRPREFIX, "$argon2id$", crypto_pwhash_strprefix)+TS(CRYPTO_SCALARMULT_PRIMITIVE, "curve25519", crypto_scalarmult_primitive)+TS(CRYPTO_SECRETBOX_PRIMITIVE, "xsalsa20poly1305", crypto_secretbox_primitive)+TS(CRYPTO_SHORTHASH_PRIMITIVE, "siphash24", crypto_shorthash_primitive)+TS(CRYPTO_SIGN_PRIMITIVE, "ed25519", crypto_sign_primitive)+TS(CRYPTO_STREAM_PRIMITIVE, "xsalsa20", crypto_stream_primitive)+TS(SODIUM_VERSION_STRING, "1.0.18", sodium_version_string)
+ libsodium.cabal view
@@ -0,0 +1,41 @@+cabal-version: 2.4+name: libsodium+version: 1.0.18.0+license: ISC+license-file: LICENSE+extra-source-files: README.md CHANGELOG.md+author: Renzo Carbonara+maintainer: renλren.zone+copyright: Copyright (c) Renzo Carbonara 2020+category: Cryptography+build-type: Simple+synopsis: Low-level bindings to the libsodium C library+description: Low-level bindings to the libsodium C library+homepage: https://github.com/k0001/hs-libsodium+bug-reports: https://github.com/k0001/hs-libsodium/issues+tested-with: GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1++common basic+  default-language: Haskell2010+  ghc-options: -Wall -Werror=incomplete-patterns+  build-depends: base == 4.*+  pkgconfig-depends: libsodium == 1.0.18++library+  import: basic+  hs-source-dirs: lib+  exposed-modules: Libsodium+  other-modules: Libsodium.Constants++test-suite test+  import: basic+  type: exitcode-stdio-1.0+  hs-source-dirs: test+  main-is: Main.hs+  build-depends:+    hedgehog,+    libsodium,+    tasty,+    tasty-hedgehog,+    tasty-hunit,+
+ test/Main.chs view
@@ -0,0 +1,417 @@+#include <sodium.h>++module Main (main) where++import Control.Monad+import Control.Monad.IO.Class+import Foreign.C.String+import Foreign.C.Types+import qualified Test.Tasty as Tasty+import qualified Test.Tasty.Runners as Tasty+import Test.Tasty (TestTree, testGroup)+import Test.Tasty.HUnit (testCase, (@=?), (@?))+import Test.Tasty.Hedgehog (testProperty)+import Hedgehog (property, forAll, (/==), diff)+import qualified Hedgehog.Gen as Gen+import qualified Hedgehog.Range as Range+import qualified Libsodium as L++--------------------------------------------------------------------------------++{# typedef size_t CSize #}+{# default in `CSize' [size_t] fromIntegral #}+{# default out `CSize' [size_t] fromIntegral #}++{# typedef uint64_t Word64 #}+{# default in `Word64' [uint64_t] fromIntegral #}+{# default out `Word64' [uint64_t] fromIntegral #}++{# typedef uint32_t Word32 #}+{# default in `Word32' [uint32_t] fromIntegral #}+{# default out `Word32' [uint32_t] fromIntegral #}++{# typedef uint16_t Word16 #}+{# default in `Word16' [uint16_t] fromIntegral #}+{# default out `Word16' [uint16_t] fromIntegral #}++{# typedef uint8_t Word8 #}+{# default in `Word8' [uint8_t] fromIntegral #}+{# default out `Word8' [uint8_t] fromIntegral #}++{# typedef int64_t Int64 #}+{# default in `Int64' [int64_t] fromIntegral #}+{# default out `Int64' [int64_t] fromIntegral #}++{# typedef int32_t Int32 #}+{# default in `Int32' [int32_t] fromIntegral #}+{# default out `Int32' [int32_t] fromIntegral #}++{# typedef int16_t Int16 #}+{# default in `Int16' [int16_t] fromIntegral #}+{# default out `Int16' [int16_t] fromIntegral #}++{# typedef int8_t Int8 #}+{# default in `Int8' [int8_t] fromIntegral #}+{# default out `Int8' [int8_t] fromIntegral #}+++--------------------------------------------------------------------------------++main :: IO ()+main = Tasty.defaultMainWithIngredients+    [ Tasty.consoleTestReporter+    , Tasty.listingTests+    ] tt_libsodium++tt_libsodium :: TestTree+tt_libsodium = testGroup "libsodium"+  [ tt_core+  , tt_constants+  , tt_randombytes+  ]++tt_core :: TestTree+tt_core = testGroup "core.h"+  [ testCase "sodium_init" $ do+      a <- L.sodium_init+      elem a [0, 1] @? "sodium_init returns 0 or 1"+      b <- L.sodium_init+      b == 1 @? "sodium_init returns 1"+  ]++tt_constants :: TestTree+tt_constants = testGroup "constants"+  [ tt_constants_numbers+  , tt_constants_strings+  ]++tt_constants_numbers :: TestTree+tt_constants_numbers = testGroup "numbers"+  [ t "randombytes_seedbytes" L.randombytes_seedbytes {# call pure unsafe randombytes_seedbytes #}+  , t "crypto_aead_aes256gcm_abytes" L.crypto_aead_aes256gcm_abytes {# call pure unsafe crypto_aead_aes256gcm_abytes #}+  , t "crypto_aead_aes256gcm_keybytes" L.crypto_aead_aes256gcm_keybytes {# call pure unsafe crypto_aead_aes256gcm_keybytes #}+  , t "crypto_aead_aes256gcm_messagebytes_max" L.crypto_aead_aes256gcm_messagebytes_max {# call pure unsafe crypto_aead_aes256gcm_messagebytes_max #}+  , t "crypto_aead_aes256gcm_npubbytes" L.crypto_aead_aes256gcm_npubbytes {# call pure unsafe crypto_aead_aes256gcm_npubbytes #}+  , t "crypto_aead_aes256gcm_nsecbytes" L.crypto_aead_aes256gcm_nsecbytes {# call pure unsafe crypto_aead_aes256gcm_nsecbytes #}+  , t "crypto_aead_aes256gcm_statebytes" L.crypto_aead_aes256gcm_statebytes {# call pure unsafe crypto_aead_aes256gcm_statebytes #}+  , t "crypto_aead_chacha20poly1305_abytes" L.crypto_aead_chacha20poly1305_abytes {# call pure unsafe crypto_aead_chacha20poly1305_abytes #}+  , t "crypto_aead_chacha20poly1305_ietf_abytes" L.crypto_aead_chacha20poly1305_ietf_abytes {# call pure unsafe crypto_aead_chacha20poly1305_ietf_abytes #}+  , t "crypto_aead_chacha20poly1305_ietf_keybytes" L.crypto_aead_chacha20poly1305_ietf_keybytes {# call pure unsafe crypto_aead_chacha20poly1305_ietf_keybytes #}+  , t "crypto_aead_chacha20poly1305_ietf_messagebytes_max" L.crypto_aead_chacha20poly1305_ietf_messagebytes_max {# call pure unsafe crypto_aead_chacha20poly1305_ietf_messagebytes_max #}+  , t "crypto_aead_chacha20poly1305_ietf_npubbytes" L.crypto_aead_chacha20poly1305_ietf_npubbytes {# call pure unsafe crypto_aead_chacha20poly1305_ietf_npubbytes #}+  , t "crypto_aead_chacha20poly1305_ietf_nsecbytes" L.crypto_aead_chacha20poly1305_ietf_nsecbytes {# call pure unsafe crypto_aead_chacha20poly1305_ietf_nsecbytes #}+  , t "crypto_aead_chacha20poly1305_keybytes" L.crypto_aead_chacha20poly1305_keybytes {# call pure unsafe crypto_aead_chacha20poly1305_keybytes #}+  , t "crypto_aead_chacha20poly1305_messagebytes_max" L.crypto_aead_chacha20poly1305_messagebytes_max {# call pure unsafe crypto_aead_chacha20poly1305_messagebytes_max #}+  , t "crypto_aead_chacha20poly1305_npubbytes" L.crypto_aead_chacha20poly1305_npubbytes {# call pure unsafe crypto_aead_chacha20poly1305_npubbytes #}+  , t "crypto_aead_chacha20poly1305_nsecbytes" L.crypto_aead_chacha20poly1305_nsecbytes {# call pure unsafe crypto_aead_chacha20poly1305_nsecbytes #}+  , t "crypto_aead_xchacha20poly1305_ietf_abytes" L.crypto_aead_xchacha20poly1305_ietf_abytes {# call pure unsafe crypto_aead_xchacha20poly1305_ietf_abytes #}+  , t "crypto_aead_xchacha20poly1305_ietf_keybytes" L.crypto_aead_xchacha20poly1305_ietf_keybytes {# call pure unsafe crypto_aead_xchacha20poly1305_ietf_keybytes #}+  , t "crypto_aead_xchacha20poly1305_ietf_messagebytes_max" L.crypto_aead_xchacha20poly1305_ietf_messagebytes_max {# call pure unsafe crypto_aead_xchacha20poly1305_ietf_messagebytes_max #}+  , t "crypto_aead_xchacha20poly1305_ietf_npubbytes" L.crypto_aead_xchacha20poly1305_ietf_npubbytes {# call pure unsafe crypto_aead_xchacha20poly1305_ietf_npubbytes #}+  , t "crypto_aead_xchacha20poly1305_ietf_nsecbytes" L.crypto_aead_xchacha20poly1305_ietf_nsecbytes {# call pure unsafe crypto_aead_xchacha20poly1305_ietf_nsecbytes #}+  , t "crypto_auth_bytes" L.crypto_auth_bytes {# call pure unsafe crypto_auth_bytes #}+  , t "crypto_auth_hmacsha256_bytes" L.crypto_auth_hmacsha256_bytes {# call pure unsafe crypto_auth_hmacsha256_bytes #}+  , t "crypto_auth_hmacsha256_keybytes" L.crypto_auth_hmacsha256_keybytes {# call pure unsafe crypto_auth_hmacsha256_keybytes #}+  , t "crypto_auth_hmacsha256_statebytes" L.crypto_auth_hmacsha256_statebytes {# call pure unsafe crypto_auth_hmacsha256_statebytes #}+  , t "crypto_auth_hmacsha512256_bytes" L.crypto_auth_hmacsha512256_bytes {# call pure unsafe crypto_auth_hmacsha512256_bytes #}+  , t "crypto_auth_hmacsha512256_keybytes" L.crypto_auth_hmacsha512256_keybytes {# call pure unsafe crypto_auth_hmacsha512256_keybytes #}+  , t "crypto_auth_hmacsha512256_statebytes" L.crypto_auth_hmacsha512256_statebytes {# call pure unsafe crypto_auth_hmacsha512256_statebytes #}+  , t "crypto_auth_hmacsha512_bytes" L.crypto_auth_hmacsha512_bytes {# call pure unsafe crypto_auth_hmacsha512_bytes #}+  , t "crypto_auth_hmacsha512_keybytes" L.crypto_auth_hmacsha512_keybytes {# call pure unsafe crypto_auth_hmacsha512_keybytes #}+  , t "crypto_auth_hmacsha512_statebytes" L.crypto_auth_hmacsha512_statebytes {# call pure unsafe crypto_auth_hmacsha512_statebytes #}+  , t "crypto_auth_keybytes" L.crypto_auth_keybytes {# call pure unsafe crypto_auth_keybytes #}+  , t "crypto_box_beforenmbytes" L.crypto_box_beforenmbytes {# call pure unsafe crypto_box_beforenmbytes #}+  , t "crypto_box_boxzerobytes" L.crypto_box_boxzerobytes {# call pure unsafe crypto_box_boxzerobytes #}+  , t "crypto_box_curve25519xchacha20poly1305_beforenmbytes" L.crypto_box_curve25519xchacha20poly1305_beforenmbytes {# call pure unsafe crypto_box_curve25519xchacha20poly1305_beforenmbytes #}+  , t "crypto_box_curve25519xchacha20poly1305_macbytes" L.crypto_box_curve25519xchacha20poly1305_macbytes {# call pure unsafe crypto_box_curve25519xchacha20poly1305_macbytes #}+  , t "crypto_box_curve25519xchacha20poly1305_messagebytes_max" L.crypto_box_curve25519xchacha20poly1305_messagebytes_max {# call pure unsafe crypto_box_curve25519xchacha20poly1305_messagebytes_max #}+  , t "crypto_box_curve25519xchacha20poly1305_noncebytes" L.crypto_box_curve25519xchacha20poly1305_noncebytes {# call pure unsafe crypto_box_curve25519xchacha20poly1305_noncebytes #}+  , t "crypto_box_curve25519xchacha20poly1305_publickeybytes" L.crypto_box_curve25519xchacha20poly1305_publickeybytes {# call pure unsafe crypto_box_curve25519xchacha20poly1305_publickeybytes #}+  , t "crypto_box_curve25519xchacha20poly1305_sealbytes" L.crypto_box_curve25519xchacha20poly1305_sealbytes {# call pure unsafe crypto_box_curve25519xchacha20poly1305_sealbytes #}+  , t "crypto_box_curve25519xchacha20poly1305_secretkeybytes" L.crypto_box_curve25519xchacha20poly1305_secretkeybytes {# call pure unsafe crypto_box_curve25519xchacha20poly1305_secretkeybytes #}+  , t "crypto_box_curve25519xchacha20poly1305_seedbytes" L.crypto_box_curve25519xchacha20poly1305_seedbytes {# call pure unsafe crypto_box_curve25519xchacha20poly1305_seedbytes #}+  , t "crypto_box_curve25519xsalsa20poly1305_beforenmbytes" L.crypto_box_curve25519xsalsa20poly1305_beforenmbytes {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_beforenmbytes #}+  , t "crypto_box_curve25519xsalsa20poly1305_boxzerobytes" L.crypto_box_curve25519xsalsa20poly1305_boxzerobytes {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_boxzerobytes #}+  , t "crypto_box_curve25519xsalsa20poly1305_macbytes" L.crypto_box_curve25519xsalsa20poly1305_macbytes {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_macbytes #}+  , t "crypto_box_curve25519xsalsa20poly1305_messagebytes_max" L.crypto_box_curve25519xsalsa20poly1305_messagebytes_max {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_messagebytes_max #}+  , t "crypto_box_curve25519xsalsa20poly1305_noncebytes" L.crypto_box_curve25519xsalsa20poly1305_noncebytes {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_noncebytes #}+  , t "crypto_box_curve25519xsalsa20poly1305_publickeybytes" L.crypto_box_curve25519xsalsa20poly1305_publickeybytes {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_publickeybytes #}+  , t "crypto_box_curve25519xsalsa20poly1305_secretkeybytes" L.crypto_box_curve25519xsalsa20poly1305_secretkeybytes {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_secretkeybytes #}+  , t "crypto_box_curve25519xsalsa20poly1305_seedbytes" L.crypto_box_curve25519xsalsa20poly1305_seedbytes {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_seedbytes #}+  , t "crypto_box_curve25519xsalsa20poly1305_zerobytes" L.crypto_box_curve25519xsalsa20poly1305_zerobytes {# call pure unsafe crypto_box_curve25519xsalsa20poly1305_zerobytes #}+  , t "crypto_box_macbytes" L.crypto_box_macbytes {# call pure unsafe crypto_box_macbytes #}+  , t "crypto_box_messagebytes_max" L.crypto_box_messagebytes_max {# call pure unsafe crypto_box_messagebytes_max #}+  , t "crypto_box_noncebytes" L.crypto_box_noncebytes {# call pure unsafe crypto_box_noncebytes #}+  , t "crypto_box_publickeybytes" L.crypto_box_publickeybytes {# call pure unsafe crypto_box_publickeybytes #}+  , t "crypto_box_sealbytes" L.crypto_box_sealbytes {# call pure unsafe crypto_box_sealbytes #}+  , t "crypto_box_secretkeybytes" L.crypto_box_secretkeybytes {# call pure unsafe crypto_box_secretkeybytes #}+  , t "crypto_box_seedbytes" L.crypto_box_seedbytes {# call pure unsafe crypto_box_seedbytes #}+  , t "crypto_box_zerobytes" L.crypto_box_zerobytes {# call pure unsafe crypto_box_zerobytes #}+  , t "crypto_core_ed25519_bytes" L.crypto_core_ed25519_bytes {# call pure unsafe crypto_core_ed25519_bytes #}+  , t "crypto_core_ed25519_hashbytes" L.crypto_core_ed25519_hashbytes {# call pure unsafe crypto_core_ed25519_hashbytes #}+  , t "crypto_core_ed25519_nonreducedscalarbytes" L.crypto_core_ed25519_nonreducedscalarbytes {# call pure unsafe crypto_core_ed25519_nonreducedscalarbytes #}+  , t "crypto_core_ed25519_scalarbytes" L.crypto_core_ed25519_scalarbytes {# call pure unsafe crypto_core_ed25519_scalarbytes #}+  , t "crypto_core_ed25519_uniformbytes" L.crypto_core_ed25519_uniformbytes {# call pure unsafe crypto_core_ed25519_uniformbytes #}+  , t "crypto_core_hchacha20_constbytes" L.crypto_core_hchacha20_constbytes {# call pure unsafe crypto_core_hchacha20_constbytes #}+  , t "crypto_core_hchacha20_inputbytes" L.crypto_core_hchacha20_inputbytes {# call pure unsafe crypto_core_hchacha20_inputbytes #}+  , t "crypto_core_hchacha20_keybytes" L.crypto_core_hchacha20_keybytes {# call pure unsafe crypto_core_hchacha20_keybytes #}+  , t "crypto_core_hchacha20_outputbytes" L.crypto_core_hchacha20_outputbytes {# call pure unsafe crypto_core_hchacha20_outputbytes #}+  , t "crypto_core_hsalsa20_constbytes" L.crypto_core_hsalsa20_constbytes {# call pure unsafe crypto_core_hsalsa20_constbytes #}+  , t "crypto_core_hsalsa20_inputbytes" L.crypto_core_hsalsa20_inputbytes {# call pure unsafe crypto_core_hsalsa20_inputbytes #}+  , t "crypto_core_hsalsa20_keybytes" L.crypto_core_hsalsa20_keybytes {# call pure unsafe crypto_core_hsalsa20_keybytes #}+  , t "crypto_core_hsalsa20_outputbytes" L.crypto_core_hsalsa20_outputbytes {# call pure unsafe crypto_core_hsalsa20_outputbytes #}+  , t "crypto_core_ristretto255_bytes" L.crypto_core_ristretto255_bytes {# call pure unsafe crypto_core_ristretto255_bytes #}+  , t "crypto_core_ristretto255_hashbytes" L.crypto_core_ristretto255_hashbytes {# call pure unsafe crypto_core_ristretto255_hashbytes #}+  , t "crypto_core_ristretto255_nonreducedscalarbytes" L.crypto_core_ristretto255_nonreducedscalarbytes {# call pure unsafe crypto_core_ristretto255_nonreducedscalarbytes #}+  , t "crypto_core_ristretto255_scalarbytes" L.crypto_core_ristretto255_scalarbytes {# call pure unsafe crypto_core_ristretto255_scalarbytes #}+  , t "crypto_core_salsa2012_constbytes" L.crypto_core_salsa2012_constbytes {# call pure unsafe crypto_core_salsa2012_constbytes #}+  , t "crypto_core_salsa2012_inputbytes" L.crypto_core_salsa2012_inputbytes {# call pure unsafe crypto_core_salsa2012_inputbytes #}+  , t "crypto_core_salsa2012_keybytes" L.crypto_core_salsa2012_keybytes {# call pure unsafe crypto_core_salsa2012_keybytes #}+  , t "crypto_core_salsa2012_outputbytes" L.crypto_core_salsa2012_outputbytes {# call pure unsafe crypto_core_salsa2012_outputbytes #}+  , t "crypto_core_salsa208_constbytes" L.crypto_core_salsa208_constbytes {# call pure unsafe crypto_core_salsa208_constbytes #}+  , t "crypto_core_salsa208_inputbytes" L.crypto_core_salsa208_inputbytes {# call pure unsafe crypto_core_salsa208_inputbytes #}+  , t "crypto_core_salsa208_keybytes" L.crypto_core_salsa208_keybytes {# call pure unsafe crypto_core_salsa208_keybytes #}+  , t "crypto_core_salsa208_outputbytes" L.crypto_core_salsa208_outputbytes {# call pure unsafe crypto_core_salsa208_outputbytes #}+  , t "crypto_core_salsa20_constbytes" L.crypto_core_salsa20_constbytes {# call pure unsafe crypto_core_salsa20_constbytes #}+  , t "crypto_core_salsa20_inputbytes" L.crypto_core_salsa20_inputbytes {# call pure unsafe crypto_core_salsa20_inputbytes #}+  , t "crypto_core_salsa20_keybytes" L.crypto_core_salsa20_keybytes {# call pure unsafe crypto_core_salsa20_keybytes #}+  , t "crypto_core_salsa20_outputbytes" L.crypto_core_salsa20_outputbytes {# call pure unsafe crypto_core_salsa20_outputbytes #}+  , t "crypto_generichash_blake2b_bytes" L.crypto_generichash_blake2b_bytes {# call pure unsafe crypto_generichash_blake2b_bytes #}+  , t "crypto_generichash_blake2b_bytes_max" L.crypto_generichash_blake2b_bytes_max {# call pure unsafe crypto_generichash_blake2b_bytes_max #}+  , t "crypto_generichash_blake2b_bytes_min" L.crypto_generichash_blake2b_bytes_min {# call pure unsafe crypto_generichash_blake2b_bytes_min #}+  , t "crypto_generichash_blake2b_keybytes" L.crypto_generichash_blake2b_keybytes {# call pure unsafe crypto_generichash_blake2b_keybytes #}+  , t "crypto_generichash_blake2b_keybytes_max" L.crypto_generichash_blake2b_keybytes_max {# call pure unsafe crypto_generichash_blake2b_keybytes_max #}+  , t "crypto_generichash_blake2b_keybytes_min" L.crypto_generichash_blake2b_keybytes_min {# call pure unsafe crypto_generichash_blake2b_keybytes_min #}+  , t "crypto_generichash_blake2b_personalbytes" L.crypto_generichash_blake2b_personalbytes {# call pure unsafe crypto_generichash_blake2b_personalbytes #}+  , t "crypto_generichash_blake2b_saltbytes" L.crypto_generichash_blake2b_saltbytes {# call pure unsafe crypto_generichash_blake2b_saltbytes #}+  , t "crypto_generichash_blake2b_statebytes" L.crypto_generichash_blake2b_statebytes {# call pure unsafe crypto_generichash_blake2b_statebytes #}+  , t "crypto_generichash_bytes" L.crypto_generichash_bytes {# call pure unsafe crypto_generichash_bytes #}+  , t "crypto_generichash_bytes_max" L.crypto_generichash_bytes_max {# call pure unsafe crypto_generichash_bytes_max #}+  , t "crypto_generichash_bytes_min" L.crypto_generichash_bytes_min {# call pure unsafe crypto_generichash_bytes_min #}+  , t "crypto_generichash_keybytes" L.crypto_generichash_keybytes {# call pure unsafe crypto_generichash_keybytes #}+  , t "crypto_generichash_keybytes_max" L.crypto_generichash_keybytes_max {# call pure unsafe crypto_generichash_keybytes_max #}+  , t "crypto_generichash_keybytes_min" L.crypto_generichash_keybytes_min {# call pure unsafe crypto_generichash_keybytes_min #}+  , t "crypto_generichash_statebytes" L.crypto_generichash_statebytes {# call pure unsafe crypto_generichash_statebytes #}+  , t "crypto_hash_bytes" L.crypto_hash_bytes {# call pure unsafe crypto_hash_bytes #}+  , t "crypto_hash_sha256_bytes" L.crypto_hash_sha256_bytes {# call pure unsafe crypto_hash_sha256_bytes #}+  , t "crypto_hash_sha256_statebytes" L.crypto_hash_sha256_statebytes {# call pure unsafe crypto_hash_sha256_statebytes #}+  , t "crypto_hash_sha512_bytes" L.crypto_hash_sha512_bytes {# call pure unsafe crypto_hash_sha512_bytes #}+  , t "crypto_hash_sha512_statebytes" L.crypto_hash_sha512_statebytes {# call pure unsafe crypto_hash_sha512_statebytes #}+  , t "crypto_kdf_blake2b_bytes_max" L.crypto_kdf_blake2b_bytes_max {# call pure unsafe crypto_kdf_blake2b_bytes_max #}+  , t "crypto_kdf_blake2b_bytes_min" L.crypto_kdf_blake2b_bytes_min {# call pure unsafe crypto_kdf_blake2b_bytes_min #}+  , t "crypto_kdf_blake2b_contextbytes" L.crypto_kdf_blake2b_contextbytes {# call pure unsafe crypto_kdf_blake2b_contextbytes #}+  , t "crypto_kdf_blake2b_keybytes" L.crypto_kdf_blake2b_keybytes {# call pure unsafe crypto_kdf_blake2b_keybytes #}+  , t "crypto_kdf_bytes_max" L.crypto_kdf_bytes_max {# call pure unsafe crypto_kdf_bytes_max #}+  , t "crypto_kdf_bytes_min" L.crypto_kdf_bytes_min {# call pure unsafe crypto_kdf_bytes_min #}+  , t "crypto_kdf_contextbytes" L.crypto_kdf_contextbytes {# call pure unsafe crypto_kdf_contextbytes #}+  , t "crypto_kdf_keybytes" L.crypto_kdf_keybytes {# call pure unsafe crypto_kdf_keybytes #}+  , t "crypto_kx_publickeybytes" L.crypto_kx_publickeybytes {# call pure unsafe crypto_kx_publickeybytes #}+  , t "crypto_kx_secretkeybytes" L.crypto_kx_secretkeybytes {# call pure unsafe crypto_kx_secretkeybytes #}+  , t "crypto_kx_seedbytes" L.crypto_kx_seedbytes {# call pure unsafe crypto_kx_seedbytes #}+  , t "crypto_kx_sessionkeybytes" L.crypto_kx_sessionkeybytes {# call pure unsafe crypto_kx_sessionkeybytes #}+  , t "crypto_onetimeauth_bytes" L.crypto_onetimeauth_bytes {# call pure unsafe crypto_onetimeauth_bytes #}+  , t "crypto_onetimeauth_keybytes" L.crypto_onetimeauth_keybytes {# call pure unsafe crypto_onetimeauth_keybytes #}+  , t "crypto_onetimeauth_poly1305_bytes" L.crypto_onetimeauth_poly1305_bytes {# call pure unsafe crypto_onetimeauth_poly1305_bytes #}+  , t "crypto_onetimeauth_poly1305_keybytes" L.crypto_onetimeauth_poly1305_keybytes {# call pure unsafe crypto_onetimeauth_poly1305_keybytes #}+  , t "crypto_onetimeauth_poly1305_statebytes" L.crypto_onetimeauth_poly1305_statebytes {# call pure unsafe crypto_onetimeauth_poly1305_statebytes #}+  , t "crypto_onetimeauth_statebytes" L.crypto_onetimeauth_statebytes {# call pure unsafe crypto_onetimeauth_statebytes #}+  , t "crypto_pwhash_alg_argon2i13" L.crypto_pwhash_alg_argon2i13 {# call pure unsafe crypto_pwhash_alg_argon2i13 #}+  , t "crypto_pwhash_alg_argon2id13" L.crypto_pwhash_alg_argon2id13 {# call pure unsafe crypto_pwhash_alg_argon2id13 #}+  , t "crypto_pwhash_alg_default" L.crypto_pwhash_alg_default {# call pure unsafe crypto_pwhash_alg_default #}+  , t "crypto_pwhash_argon2i_alg_argon2i13" L.crypto_pwhash_argon2i_alg_argon2i13 {# call pure unsafe crypto_pwhash_argon2i_alg_argon2i13 #}+  , t "crypto_pwhash_argon2i_bytes_max" L.crypto_pwhash_argon2i_bytes_max {# call pure unsafe crypto_pwhash_argon2i_bytes_max #}+  , t "crypto_pwhash_argon2i_bytes_min" L.crypto_pwhash_argon2i_bytes_min {# call pure unsafe crypto_pwhash_argon2i_bytes_min #}+  , t "crypto_pwhash_argon2id_alg_argon2id13" L.crypto_pwhash_argon2id_alg_argon2id13 {# call pure unsafe crypto_pwhash_argon2id_alg_argon2id13 #}+  , t "crypto_pwhash_argon2id_bytes_max" L.crypto_pwhash_argon2id_bytes_max {# call pure unsafe crypto_pwhash_argon2id_bytes_max #}+  , t "crypto_pwhash_argon2id_bytes_min" L.crypto_pwhash_argon2id_bytes_min {# call pure unsafe crypto_pwhash_argon2id_bytes_min #}+  , t "crypto_pwhash_argon2id_memlimit_interactive" L.crypto_pwhash_argon2id_memlimit_interactive {# call pure unsafe crypto_pwhash_argon2id_memlimit_interactive #}+  , t "crypto_pwhash_argon2id_memlimit_max" L.crypto_pwhash_argon2id_memlimit_max {# call pure unsafe crypto_pwhash_argon2id_memlimit_max #}+  , t "crypto_pwhash_argon2id_memlimit_min" L.crypto_pwhash_argon2id_memlimit_min {# call pure unsafe crypto_pwhash_argon2id_memlimit_min #}+  , t "crypto_pwhash_argon2id_memlimit_moderate" L.crypto_pwhash_argon2id_memlimit_moderate {# call pure unsafe crypto_pwhash_argon2id_memlimit_moderate #}+  , t "crypto_pwhash_argon2id_memlimit_sensitive" L.crypto_pwhash_argon2id_memlimit_sensitive {# call pure unsafe crypto_pwhash_argon2id_memlimit_sensitive #}+  , t "crypto_pwhash_argon2id_opslimit_interactive" L.crypto_pwhash_argon2id_opslimit_interactive {# call pure unsafe crypto_pwhash_argon2id_opslimit_interactive #}+  , t "crypto_pwhash_argon2id_opslimit_max" L.crypto_pwhash_argon2id_opslimit_max {# call pure unsafe crypto_pwhash_argon2id_opslimit_max #}+  , t "crypto_pwhash_argon2id_opslimit_min" L.crypto_pwhash_argon2id_opslimit_min {# call pure unsafe crypto_pwhash_argon2id_opslimit_min #}+  , t "crypto_pwhash_argon2id_opslimit_moderate" L.crypto_pwhash_argon2id_opslimit_moderate {# call pure unsafe crypto_pwhash_argon2id_opslimit_moderate #}+  , t "crypto_pwhash_argon2id_opslimit_sensitive" L.crypto_pwhash_argon2id_opslimit_sensitive {# call pure unsafe crypto_pwhash_argon2id_opslimit_sensitive #}+  , t "crypto_pwhash_argon2id_passwd_max" L.crypto_pwhash_argon2id_passwd_max {# call pure unsafe crypto_pwhash_argon2id_passwd_max #}+  , t "crypto_pwhash_argon2id_passwd_min" L.crypto_pwhash_argon2id_passwd_min {# call pure unsafe crypto_pwhash_argon2id_passwd_min #}+  , t "crypto_pwhash_argon2id_saltbytes" L.crypto_pwhash_argon2id_saltbytes {# call pure unsafe crypto_pwhash_argon2id_saltbytes #}+  , t "crypto_pwhash_argon2id_strbytes" L.crypto_pwhash_argon2id_strbytes {# call pure unsafe crypto_pwhash_argon2id_strbytes #}+  , t "crypto_pwhash_argon2i_memlimit_interactive" L.crypto_pwhash_argon2i_memlimit_interactive {# call pure unsafe crypto_pwhash_argon2i_memlimit_interactive #}+  , t "crypto_pwhash_argon2i_memlimit_max" L.crypto_pwhash_argon2i_memlimit_max {# call pure unsafe crypto_pwhash_argon2i_memlimit_max #}+  , t "crypto_pwhash_argon2i_memlimit_min" L.crypto_pwhash_argon2i_memlimit_min {# call pure unsafe crypto_pwhash_argon2i_memlimit_min #}+  , t "crypto_pwhash_argon2i_memlimit_moderate" L.crypto_pwhash_argon2i_memlimit_moderate {# call pure unsafe crypto_pwhash_argon2i_memlimit_moderate #}+  , t "crypto_pwhash_argon2i_memlimit_sensitive" L.crypto_pwhash_argon2i_memlimit_sensitive {# call pure unsafe crypto_pwhash_argon2i_memlimit_sensitive #}+  , t "crypto_pwhash_argon2i_opslimit_interactive" L.crypto_pwhash_argon2i_opslimit_interactive {# call pure unsafe crypto_pwhash_argon2i_opslimit_interactive #}+  , t "crypto_pwhash_argon2i_opslimit_max" L.crypto_pwhash_argon2i_opslimit_max {# call pure unsafe crypto_pwhash_argon2i_opslimit_max #}+  , t "crypto_pwhash_argon2i_opslimit_min" L.crypto_pwhash_argon2i_opslimit_min {# call pure unsafe crypto_pwhash_argon2i_opslimit_min #}+  , t "crypto_pwhash_argon2i_opslimit_moderate" L.crypto_pwhash_argon2i_opslimit_moderate {# call pure unsafe crypto_pwhash_argon2i_opslimit_moderate #}+  , t "crypto_pwhash_argon2i_opslimit_sensitive" L.crypto_pwhash_argon2i_opslimit_sensitive {# call pure unsafe crypto_pwhash_argon2i_opslimit_sensitive #}+  , t "crypto_pwhash_argon2i_passwd_max" L.crypto_pwhash_argon2i_passwd_max {# call pure unsafe crypto_pwhash_argon2i_passwd_max #}+  , t "crypto_pwhash_argon2i_passwd_min" L.crypto_pwhash_argon2i_passwd_min {# call pure unsafe crypto_pwhash_argon2i_passwd_min #}+  , t "crypto_pwhash_argon2i_saltbytes" L.crypto_pwhash_argon2i_saltbytes {# call pure unsafe crypto_pwhash_argon2i_saltbytes #}+  , t "crypto_pwhash_argon2i_strbytes" L.crypto_pwhash_argon2i_strbytes {# call pure unsafe crypto_pwhash_argon2i_strbytes #}+  , t "crypto_pwhash_bytes_max" L.crypto_pwhash_bytes_max {# call pure unsafe crypto_pwhash_bytes_max #}+  , t "crypto_pwhash_bytes_min" L.crypto_pwhash_bytes_min {# call pure unsafe crypto_pwhash_bytes_min #}+  , t "crypto_pwhash_memlimit_interactive" L.crypto_pwhash_memlimit_interactive {# call pure unsafe crypto_pwhash_memlimit_interactive #}+  , t "crypto_pwhash_memlimit_max" L.crypto_pwhash_memlimit_max {# call pure unsafe crypto_pwhash_memlimit_max #}+  , t "crypto_pwhash_memlimit_min" L.crypto_pwhash_memlimit_min {# call pure unsafe crypto_pwhash_memlimit_min #}+  , t "crypto_pwhash_memlimit_moderate" L.crypto_pwhash_memlimit_moderate {# call pure unsafe crypto_pwhash_memlimit_moderate #}+  , t "crypto_pwhash_memlimit_sensitive" L.crypto_pwhash_memlimit_sensitive {# call pure unsafe crypto_pwhash_memlimit_sensitive #}+  , t "crypto_pwhash_opslimit_interactive" L.crypto_pwhash_opslimit_interactive {# call pure unsafe crypto_pwhash_opslimit_interactive #}+  , t "crypto_pwhash_opslimit_max" L.crypto_pwhash_opslimit_max {# call pure unsafe crypto_pwhash_opslimit_max #}+  , t "crypto_pwhash_opslimit_min" L.crypto_pwhash_opslimit_min {# call pure unsafe crypto_pwhash_opslimit_min #}+  , t "crypto_pwhash_opslimit_moderate" L.crypto_pwhash_opslimit_moderate {# call pure unsafe crypto_pwhash_opslimit_moderate #}+  , t "crypto_pwhash_opslimit_sensitive" L.crypto_pwhash_opslimit_sensitive {# call pure unsafe crypto_pwhash_opslimit_sensitive #}+  , t "crypto_pwhash_passwd_max" L.crypto_pwhash_passwd_max {# call pure unsafe crypto_pwhash_passwd_max #}+  , t "crypto_pwhash_passwd_min" L.crypto_pwhash_passwd_min {# call pure unsafe crypto_pwhash_passwd_min #}+  , t "crypto_pwhash_saltbytes" L.crypto_pwhash_saltbytes {# call pure unsafe crypto_pwhash_saltbytes #}+  , t "crypto_pwhash_scryptsalsa208sha256_bytes_max" L.crypto_pwhash_scryptsalsa208sha256_bytes_max {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_bytes_max #}+  , t "crypto_pwhash_scryptsalsa208sha256_bytes_min" L.crypto_pwhash_scryptsalsa208sha256_bytes_min {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_bytes_min #}+  , t "crypto_pwhash_scryptsalsa208sha256_memlimit_interactive" L.crypto_pwhash_scryptsalsa208sha256_memlimit_interactive {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_memlimit_interactive #}+  , t "crypto_pwhash_scryptsalsa208sha256_memlimit_max" L.crypto_pwhash_scryptsalsa208sha256_memlimit_max {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_memlimit_max #}+  , t "crypto_pwhash_scryptsalsa208sha256_memlimit_min" L.crypto_pwhash_scryptsalsa208sha256_memlimit_min {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_memlimit_min #}+  , t "crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive" L.crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive #}+  , t "crypto_pwhash_scryptsalsa208sha256_opslimit_interactive" L.crypto_pwhash_scryptsalsa208sha256_opslimit_interactive {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_opslimit_interactive #}+  , t "crypto_pwhash_scryptsalsa208sha256_opslimit_max" L.crypto_pwhash_scryptsalsa208sha256_opslimit_max {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_opslimit_max #}+  , t "crypto_pwhash_scryptsalsa208sha256_opslimit_min" L.crypto_pwhash_scryptsalsa208sha256_opslimit_min {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_opslimit_min #}+  , t "crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive" L.crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive #}+  , t "crypto_pwhash_scryptsalsa208sha256_passwd_max" L.crypto_pwhash_scryptsalsa208sha256_passwd_max {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_passwd_max #}+  , t "crypto_pwhash_scryptsalsa208sha256_passwd_min" L.crypto_pwhash_scryptsalsa208sha256_passwd_min {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_passwd_min #}+  , t "crypto_pwhash_scryptsalsa208sha256_saltbytes" L.crypto_pwhash_scryptsalsa208sha256_saltbytes {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_saltbytes #}+  , t "crypto_pwhash_scryptsalsa208sha256_strbytes" L.crypto_pwhash_scryptsalsa208sha256_strbytes {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_strbytes #}+  , t "crypto_pwhash_strbytes" L.crypto_pwhash_strbytes {# call pure unsafe crypto_pwhash_strbytes #}+  , t "crypto_scalarmult_bytes" L.crypto_scalarmult_bytes {# call pure unsafe crypto_scalarmult_bytes #}+  , t "crypto_scalarmult_curve25519_bytes" L.crypto_scalarmult_curve25519_bytes {# call pure unsafe crypto_scalarmult_curve25519_bytes #}+  , t "crypto_scalarmult_curve25519_scalarbytes" L.crypto_scalarmult_curve25519_scalarbytes {# call pure unsafe crypto_scalarmult_curve25519_scalarbytes #}+  , t "crypto_scalarmult_ed25519_bytes" L.crypto_scalarmult_ed25519_bytes {# call pure unsafe crypto_scalarmult_ed25519_bytes #}+  , t "crypto_scalarmult_ed25519_scalarbytes" L.crypto_scalarmult_ed25519_scalarbytes {# call pure unsafe crypto_scalarmult_ed25519_scalarbytes #}+  , t "crypto_scalarmult_ristretto255_bytes" L.crypto_scalarmult_ristretto255_bytes {# call pure unsafe crypto_scalarmult_ristretto255_bytes #}+  , t "crypto_scalarmult_ristretto255_scalarbytes" L.crypto_scalarmult_ristretto255_scalarbytes {# call pure unsafe crypto_scalarmult_ristretto255_scalarbytes #}+  , t "crypto_scalarmult_scalarbytes" L.crypto_scalarmult_scalarbytes {# call pure unsafe crypto_scalarmult_scalarbytes #}+  , t "crypto_secretbox_boxzerobytes" L.crypto_secretbox_boxzerobytes {# call pure unsafe crypto_secretbox_boxzerobytes #}+  , t "crypto_secretbox_keybytes" L.crypto_secretbox_keybytes {# call pure unsafe crypto_secretbox_keybytes #}+  , t "crypto_secretbox_macbytes" L.crypto_secretbox_macbytes {# call pure unsafe crypto_secretbox_macbytes #}+  , t "crypto_secretbox_messagebytes_max" L.crypto_secretbox_messagebytes_max {# call pure unsafe crypto_secretbox_messagebytes_max #}+  , t "crypto_secretbox_noncebytes" L.crypto_secretbox_noncebytes {# call pure unsafe crypto_secretbox_noncebytes #}+  , t "crypto_secretbox_xchacha20poly1305_keybytes" L.crypto_secretbox_xchacha20poly1305_keybytes {# call pure unsafe crypto_secretbox_xchacha20poly1305_keybytes #}+  , t "crypto_secretbox_xchacha20poly1305_macbytes" L.crypto_secretbox_xchacha20poly1305_macbytes {# call pure unsafe crypto_secretbox_xchacha20poly1305_macbytes #}+  , t "crypto_secretbox_xchacha20poly1305_messagebytes_max" L.crypto_secretbox_xchacha20poly1305_messagebytes_max {# call pure unsafe crypto_secretbox_xchacha20poly1305_messagebytes_max #}+  , t "crypto_secretbox_xchacha20poly1305_noncebytes" L.crypto_secretbox_xchacha20poly1305_noncebytes {# call pure unsafe crypto_secretbox_xchacha20poly1305_noncebytes #}+  , t "crypto_secretbox_xsalsa20poly1305_boxzerobytes" L.crypto_secretbox_xsalsa20poly1305_boxzerobytes {# call pure unsafe crypto_secretbox_xsalsa20poly1305_boxzerobytes #}+  , t "crypto_secretbox_xsalsa20poly1305_keybytes" L.crypto_secretbox_xsalsa20poly1305_keybytes {# call pure unsafe crypto_secretbox_xsalsa20poly1305_keybytes #}+  , t "crypto_secretbox_xsalsa20poly1305_macbytes" L.crypto_secretbox_xsalsa20poly1305_macbytes {# call pure unsafe crypto_secretbox_xsalsa20poly1305_macbytes #}+  , t "crypto_secretbox_xsalsa20poly1305_messagebytes_max" L.crypto_secretbox_xsalsa20poly1305_messagebytes_max {# call pure unsafe crypto_secretbox_xsalsa20poly1305_messagebytes_max #}+  , t "crypto_secretbox_xsalsa20poly1305_noncebytes" L.crypto_secretbox_xsalsa20poly1305_noncebytes {# call pure unsafe crypto_secretbox_xsalsa20poly1305_noncebytes #}+  , t "crypto_secretbox_xsalsa20poly1305_zerobytes" L.crypto_secretbox_xsalsa20poly1305_zerobytes {# call pure unsafe crypto_secretbox_xsalsa20poly1305_zerobytes #}+  , t "crypto_secretbox_zerobytes" L.crypto_secretbox_zerobytes {# call pure unsafe crypto_secretbox_zerobytes #}+  , t "crypto_secretstream_xchacha20poly1305_abytes" L.crypto_secretstream_xchacha20poly1305_abytes {# call pure unsafe crypto_secretstream_xchacha20poly1305_abytes #}+  , t "crypto_secretstream_xchacha20poly1305_headerbytes" L.crypto_secretstream_xchacha20poly1305_headerbytes {# call pure unsafe crypto_secretstream_xchacha20poly1305_headerbytes #}+  , t "crypto_secretstream_xchacha20poly1305_keybytes" L.crypto_secretstream_xchacha20poly1305_keybytes {# call pure unsafe crypto_secretstream_xchacha20poly1305_keybytes #}+  , t "crypto_secretstream_xchacha20poly1305_messagebytes_max" L.crypto_secretstream_xchacha20poly1305_messagebytes_max {# call pure unsafe crypto_secretstream_xchacha20poly1305_messagebytes_max #}+  , t "crypto_secretstream_xchacha20poly1305_statebytes" L.crypto_secretstream_xchacha20poly1305_statebytes {# call pure unsafe crypto_secretstream_xchacha20poly1305_statebytes #}+  , t "crypto_secretstream_xchacha20poly1305_tag_final" L.crypto_secretstream_xchacha20poly1305_tag_final {# call pure unsafe crypto_secretstream_xchacha20poly1305_tag_final #}+  , t "crypto_secretstream_xchacha20poly1305_tag_message" L.crypto_secretstream_xchacha20poly1305_tag_message {# call pure unsafe crypto_secretstream_xchacha20poly1305_tag_message #}+  , t "crypto_secretstream_xchacha20poly1305_tag_push" L.crypto_secretstream_xchacha20poly1305_tag_push {# call pure unsafe crypto_secretstream_xchacha20poly1305_tag_push #}+  , t "crypto_secretstream_xchacha20poly1305_tag_rekey" L.crypto_secretstream_xchacha20poly1305_tag_rekey {# call pure unsafe crypto_secretstream_xchacha20poly1305_tag_rekey #}+  , t "crypto_shorthash_bytes" L.crypto_shorthash_bytes {# call pure unsafe crypto_shorthash_bytes #}+  , t "crypto_shorthash_keybytes" L.crypto_shorthash_keybytes {# call pure unsafe crypto_shorthash_keybytes #}+  , t "crypto_shorthash_siphash24_bytes" L.crypto_shorthash_siphash24_bytes {# call pure unsafe crypto_shorthash_siphash24_bytes #}+  , t "crypto_shorthash_siphash24_keybytes" L.crypto_shorthash_siphash24_keybytes {# call pure unsafe crypto_shorthash_siphash24_keybytes #}+  , t "crypto_shorthash_siphashx24_bytes" L.crypto_shorthash_siphashx24_bytes {# call pure unsafe crypto_shorthash_siphashx24_bytes #}+  , t "crypto_shorthash_siphashx24_keybytes" L.crypto_shorthash_siphashx24_keybytes {# call pure unsafe crypto_shorthash_siphashx24_keybytes #}+  , t "crypto_sign_bytes" L.crypto_sign_bytes {# call pure unsafe crypto_sign_bytes #}+  , t "crypto_sign_ed25519_bytes" L.crypto_sign_ed25519_bytes {# call pure unsafe crypto_sign_ed25519_bytes #}+  , t "crypto_sign_ed25519_messagebytes_max" L.crypto_sign_ed25519_messagebytes_max {# call pure unsafe crypto_sign_ed25519_messagebytes_max #}+  , t "crypto_sign_ed25519ph_statebytes" L.crypto_sign_ed25519ph_statebytes {# call pure unsafe crypto_sign_ed25519ph_statebytes #}+  , t "crypto_sign_ed25519_publickeybytes" L.crypto_sign_ed25519_publickeybytes {# call pure unsafe crypto_sign_ed25519_publickeybytes #}+  , t "crypto_sign_ed25519_secretkeybytes" L.crypto_sign_ed25519_secretkeybytes {# call pure unsafe crypto_sign_ed25519_secretkeybytes #}+  , t "crypto_sign_ed25519_seedbytes" L.crypto_sign_ed25519_seedbytes {# call pure unsafe crypto_sign_ed25519_seedbytes #}+  , t "crypto_sign_messagebytes_max" L.crypto_sign_messagebytes_max {# call pure unsafe crypto_sign_messagebytes_max #}+  , t "crypto_sign_publickeybytes" L.crypto_sign_publickeybytes {# call pure unsafe crypto_sign_publickeybytes #}+  , t "crypto_sign_secretkeybytes" L.crypto_sign_secretkeybytes {# call pure unsafe crypto_sign_secretkeybytes #}+  , t "crypto_sign_seedbytes" L.crypto_sign_seedbytes {# call pure unsafe crypto_sign_seedbytes #}+  , t "crypto_sign_statebytes" L.crypto_sign_statebytes {# call pure unsafe crypto_sign_statebytes #}+  , t "crypto_stream_chacha20_ietf_keybytes" L.crypto_stream_chacha20_ietf_keybytes {# call pure unsafe crypto_stream_chacha20_ietf_keybytes #}+  , t "crypto_stream_chacha20_ietf_messagebytes_max" L.crypto_stream_chacha20_ietf_messagebytes_max {# call pure unsafe crypto_stream_chacha20_ietf_messagebytes_max #}+  , t "crypto_stream_chacha20_ietf_noncebytes" L.crypto_stream_chacha20_ietf_noncebytes {# call pure unsafe crypto_stream_chacha20_ietf_noncebytes #}+  , t "crypto_stream_chacha20_keybytes" L.crypto_stream_chacha20_keybytes {# call pure unsafe crypto_stream_chacha20_keybytes #}+  , t "crypto_stream_chacha20_messagebytes_max" L.crypto_stream_chacha20_messagebytes_max {# call pure unsafe crypto_stream_chacha20_messagebytes_max #}+  , t "crypto_stream_chacha20_noncebytes" L.crypto_stream_chacha20_noncebytes {# call pure unsafe crypto_stream_chacha20_noncebytes #}+  , t "crypto_stream_keybytes" L.crypto_stream_keybytes {# call pure unsafe crypto_stream_keybytes #}+  , t "crypto_stream_messagebytes_max" L.crypto_stream_messagebytes_max {# call pure unsafe crypto_stream_messagebytes_max #}+  , t "crypto_stream_noncebytes" L.crypto_stream_noncebytes {# call pure unsafe crypto_stream_noncebytes #}+  , t "crypto_stream_salsa2012_keybytes" L.crypto_stream_salsa2012_keybytes {# call pure unsafe crypto_stream_salsa2012_keybytes #}+  , t "crypto_stream_salsa2012_messagebytes_max" L.crypto_stream_salsa2012_messagebytes_max {# call pure unsafe crypto_stream_salsa2012_messagebytes_max #}+  , t "crypto_stream_salsa2012_noncebytes" L.crypto_stream_salsa2012_noncebytes {# call pure unsafe crypto_stream_salsa2012_noncebytes #}+  , t "crypto_stream_salsa208_keybytes" L.crypto_stream_salsa208_keybytes {# call pure unsafe crypto_stream_salsa208_keybytes #}+  , t "crypto_stream_salsa208_messagebytes_max" L.crypto_stream_salsa208_messagebytes_max {# call pure unsafe crypto_stream_salsa208_messagebytes_max #}+  , t "crypto_stream_salsa208_noncebytes" L.crypto_stream_salsa208_noncebytes {# call pure unsafe crypto_stream_salsa208_noncebytes #}+  , t "crypto_stream_salsa20_keybytes" L.crypto_stream_salsa20_keybytes {# call pure unsafe crypto_stream_salsa20_keybytes #}+  , t "crypto_stream_salsa20_messagebytes_max" L.crypto_stream_salsa20_messagebytes_max {# call pure unsafe crypto_stream_salsa20_messagebytes_max #}+  , t "crypto_stream_salsa20_noncebytes" L.crypto_stream_salsa20_noncebytes {# call pure unsafe crypto_stream_salsa20_noncebytes #}+  , t "crypto_stream_xchacha20_keybytes" L.crypto_stream_xchacha20_keybytes {# call pure unsafe crypto_stream_xchacha20_keybytes #}+  , t "crypto_stream_xchacha20_messagebytes_max" L.crypto_stream_xchacha20_messagebytes_max {# call pure unsafe crypto_stream_xchacha20_messagebytes_max #}+  , t "crypto_stream_xchacha20_noncebytes" L.crypto_stream_xchacha20_noncebytes {# call pure unsafe crypto_stream_xchacha20_noncebytes #}+  , t "crypto_stream_xsalsa20_keybytes" L.crypto_stream_xsalsa20_keybytes {# call pure unsafe crypto_stream_xsalsa20_keybytes #}+  , t "crypto_stream_xsalsa20_messagebytes_max" L.crypto_stream_xsalsa20_messagebytes_max {# call pure unsafe crypto_stream_xsalsa20_messagebytes_max #}+  , t "crypto_stream_xsalsa20_noncebytes" L.crypto_stream_xsalsa20_noncebytes {# call pure unsafe crypto_stream_xsalsa20_noncebytes #}+  , t "crypto_verify_16_bytes" L.crypto_verify_16_bytes {# call pure unsafe crypto_verify_16_bytes #}+  , t "crypto_verify_32_bytes" L.crypto_verify_32_bytes {# call pure unsafe crypto_verify_32_bytes #}+  , t "crypto_verify_64_bytes" L.crypto_verify_64_bytes {# call pure unsafe crypto_verify_64_bytes #}+  , t "randombytes_seedbytes" L.randombytes_seedbytes {# call pure unsafe randombytes_seedbytes #}+  , t "sodium_library_minimal" L.sodium_library_minimal {# call pure unsafe sodium_library_minimal #}+  , t "sodium_library_version_major" L.sodium_library_version_major {# call pure unsafe sodium_library_version_major #}+  , t "sodium_library_version_minor" L.sodium_library_version_minor {# call pure unsafe sodium_library_version_minor #}+  ]+  where t :: (Eq n, Show n, Num n) => String -> n -> n -> TestTree+        t name expected actual = testCase name (expected @=? actual)++tt_constants_strings :: TestTree+tt_constants_strings = testGroup "strings"+  [ t "sodium_version_string" L.sodium_version_string {# call pure unsafe sodium_version_string #}+  , t "crypto_auth_primitive" L.crypto_auth_primitive {# call pure unsafe crypto_auth_primitive #}+  , t "crypto_box_primitive" L.crypto_box_primitive {# call pure unsafe crypto_box_primitive #}+  , t "crypto_generichash_primitive" L.crypto_generichash_primitive {# call pure unsafe crypto_generichash_primitive #}+  , t "crypto_hash_primitive" L.crypto_hash_primitive {# call pure unsafe crypto_hash_primitive #}+  , t "crypto_kdf_primitive" L.crypto_kdf_primitive {# call pure unsafe crypto_kdf_primitive #}+  , t "crypto_kx_primitive" L.crypto_kx_primitive {# call pure unsafe crypto_kx_primitive #}+  , t "crypto_onetimeauth_primitive" L.crypto_onetimeauth_primitive {# call pure unsafe crypto_onetimeauth_primitive #}+  , t "crypto_pwhash_argon2id_strprefix" L.crypto_pwhash_argon2id_strprefix {# call pure unsafe crypto_pwhash_argon2id_strprefix #}+  , t "crypto_pwhash_argon2i_strprefix" L.crypto_pwhash_argon2i_strprefix {# call pure unsafe crypto_pwhash_argon2i_strprefix #}+  , t "crypto_pwhash_primitive" L.crypto_pwhash_primitive {# call pure unsafe crypto_pwhash_primitive #}+  , t "crypto_pwhash_scryptsalsa208sha256_strprefix" L.crypto_pwhash_scryptsalsa208sha256_strprefix {# call pure unsafe crypto_pwhash_scryptsalsa208sha256_strprefix #}+  , t "crypto_pwhash_strprefix" L.crypto_pwhash_strprefix {# call pure unsafe crypto_pwhash_strprefix #}+  , t "crypto_scalarmult_primitive" L.crypto_scalarmult_primitive {# call pure unsafe crypto_scalarmult_primitive #}+  , t "crypto_secretbox_primitive" L.crypto_secretbox_primitive {# call pure unsafe crypto_secretbox_primitive #}+  , t "crypto_shorthash_primitive" L.crypto_shorthash_primitive {# call pure unsafe crypto_shorthash_primitive #}+  , t "crypto_sign_primitive" L.crypto_sign_primitive {# call pure unsafe crypto_sign_primitive #}+  , t "crypto_stream_primitive" L.crypto_stream_primitive {# call pure unsafe crypto_stream_primitive #}+  , t "sodium_version_string" L.sodium_version_string {# call pure unsafe sodium_version_string #}+  ]+  where+    t :: String -> String -> CString -> TestTree+    t name expected cactual = testCase name $ do+      ver <- peekCString cactual+      expected @=? ver++tt_randombytes :: TestTree+tt_randombytes = testGroup "randombytes.h"+  [ testGroup "randombytes_uniform"+    [ testCase "zero" $ do+        x <- L.randombytes_uniform 0+        0 @=? x+    , testProperty "non-zero" $ property $ do+        ub <- forAll $ Gen.integral $ Range.constant 1 10+        x <- liftIO $ L.randombytes_uniform ub+        diff x (>=) 0+        diff x (<) ub+    ]+  , testProperty "randombytes_random" $ property $ do+      n <- forAll $ Gen.int $ Range.singleton 5+      as <- liftIO $ replicateM n L.randombytes_random+      bs <- liftIO $ replicateM n L.randombytes_random+      as /== bs+  ]+