libsodium_sys/
sodium_bindings.rs

1/* automatically generated by rust-bindgen */
2
3pub const SODIUM_VERSION_STRING: &'static [u8; 7usize] = b"1.0.18\0";
4pub const SODIUM_LIBRARY_VERSION_MAJOR: u32 = 10;
5pub const SODIUM_LIBRARY_VERSION_MINOR: u32 = 3;
6pub const crypto_aead_aes256gcm_KEYBYTES: u32 = 32;
7pub const crypto_aead_aes256gcm_NSECBYTES: u32 = 0;
8pub const crypto_aead_aes256gcm_NPUBBYTES: u32 = 12;
9pub const crypto_aead_aes256gcm_ABYTES: u32 = 16;
10pub const crypto_aead_chacha20poly1305_ietf_KEYBYTES: u32 = 32;
11pub const crypto_aead_chacha20poly1305_ietf_NSECBYTES: u32 = 0;
12pub const crypto_aead_chacha20poly1305_ietf_NPUBBYTES: u32 = 12;
13pub const crypto_aead_chacha20poly1305_ietf_ABYTES: u32 = 16;
14pub const crypto_aead_chacha20poly1305_KEYBYTES: u32 = 32;
15pub const crypto_aead_chacha20poly1305_NSECBYTES: u32 = 0;
16pub const crypto_aead_chacha20poly1305_NPUBBYTES: u32 = 8;
17pub const crypto_aead_chacha20poly1305_ABYTES: u32 = 16;
18pub const crypto_aead_chacha20poly1305_IETF_KEYBYTES: u32 = 32;
19pub const crypto_aead_chacha20poly1305_IETF_NSECBYTES: u32 = 0;
20pub const crypto_aead_chacha20poly1305_IETF_NPUBBYTES: u32 = 12;
21pub const crypto_aead_chacha20poly1305_IETF_ABYTES: u32 = 16;
22pub const crypto_aead_xchacha20poly1305_ietf_KEYBYTES: u32 = 32;
23pub const crypto_aead_xchacha20poly1305_ietf_NSECBYTES: u32 = 0;
24pub const crypto_aead_xchacha20poly1305_ietf_NPUBBYTES: u32 = 24;
25pub const crypto_aead_xchacha20poly1305_ietf_ABYTES: u32 = 16;
26pub const crypto_aead_xchacha20poly1305_IETF_KEYBYTES: u32 = 32;
27pub const crypto_aead_xchacha20poly1305_IETF_NSECBYTES: u32 = 0;
28pub const crypto_aead_xchacha20poly1305_IETF_NPUBBYTES: u32 = 24;
29pub const crypto_aead_xchacha20poly1305_IETF_ABYTES: u32 = 16;
30pub const crypto_hash_sha512_BYTES: u32 = 64;
31pub const crypto_auth_hmacsha512_BYTES: u32 = 64;
32pub const crypto_auth_hmacsha512_KEYBYTES: u32 = 32;
33pub const crypto_auth_hmacsha512256_BYTES: u32 = 32;
34pub const crypto_auth_hmacsha512256_KEYBYTES: u32 = 32;
35pub const crypto_auth_BYTES: u32 = 32;
36pub const crypto_auth_KEYBYTES: u32 = 32;
37pub const crypto_auth_PRIMITIVE: &'static [u8; 14usize] = b"hmacsha512256\0";
38pub const crypto_hash_sha256_BYTES: u32 = 32;
39pub const crypto_auth_hmacsha256_BYTES: u32 = 32;
40pub const crypto_auth_hmacsha256_KEYBYTES: u32 = 32;
41pub const crypto_stream_xsalsa20_KEYBYTES: u32 = 32;
42pub const crypto_stream_xsalsa20_NONCEBYTES: u32 = 24;
43pub const crypto_box_curve25519xsalsa20poly1305_SEEDBYTES: u32 = 32;
44pub const crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES: u32 = 32;
45pub const crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES: u32 = 32;
46pub const crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES: u32 = 32;
47pub const crypto_box_curve25519xsalsa20poly1305_NONCEBYTES: u32 = 24;
48pub const crypto_box_curve25519xsalsa20poly1305_MACBYTES: u32 = 16;
49pub const crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES: u32 = 16;
50pub const crypto_box_curve25519xsalsa20poly1305_ZEROBYTES: u32 = 32;
51pub const crypto_box_SEEDBYTES: u32 = 32;
52pub const crypto_box_PUBLICKEYBYTES: u32 = 32;
53pub const crypto_box_SECRETKEYBYTES: u32 = 32;
54pub const crypto_box_NONCEBYTES: u32 = 24;
55pub const crypto_box_MACBYTES: u32 = 16;
56pub const crypto_box_PRIMITIVE: &'static [u8; 27usize] = b"curve25519xsalsa20poly1305\0";
57pub const crypto_box_BEFORENMBYTES: u32 = 32;
58pub const crypto_box_SEALBYTES: u32 = 48;
59pub const crypto_box_ZEROBYTES: u32 = 32;
60pub const crypto_box_BOXZEROBYTES: u32 = 16;
61pub const crypto_core_hsalsa20_OUTPUTBYTES: u32 = 32;
62pub const crypto_core_hsalsa20_INPUTBYTES: u32 = 16;
63pub const crypto_core_hsalsa20_KEYBYTES: u32 = 32;
64pub const crypto_core_hsalsa20_CONSTBYTES: u32 = 16;
65pub const crypto_core_hchacha20_OUTPUTBYTES: u32 = 32;
66pub const crypto_core_hchacha20_INPUTBYTES: u32 = 16;
67pub const crypto_core_hchacha20_KEYBYTES: u32 = 32;
68pub const crypto_core_hchacha20_CONSTBYTES: u32 = 16;
69pub const crypto_core_salsa20_OUTPUTBYTES: u32 = 64;
70pub const crypto_core_salsa20_INPUTBYTES: u32 = 16;
71pub const crypto_core_salsa20_KEYBYTES: u32 = 32;
72pub const crypto_core_salsa20_CONSTBYTES: u32 = 16;
73pub const crypto_core_salsa2012_OUTPUTBYTES: u32 = 64;
74pub const crypto_core_salsa2012_INPUTBYTES: u32 = 16;
75pub const crypto_core_salsa2012_KEYBYTES: u32 = 32;
76pub const crypto_core_salsa2012_CONSTBYTES: u32 = 16;
77pub const crypto_core_salsa208_OUTPUTBYTES: u32 = 64;
78pub const crypto_core_salsa208_INPUTBYTES: u32 = 16;
79pub const crypto_core_salsa208_KEYBYTES: u32 = 32;
80pub const crypto_core_salsa208_CONSTBYTES: u32 = 16;
81pub const crypto_generichash_blake2b_BYTES_MIN: u32 = 16;
82pub const crypto_generichash_blake2b_BYTES_MAX: u32 = 64;
83pub const crypto_generichash_blake2b_BYTES: u32 = 32;
84pub const crypto_generichash_blake2b_KEYBYTES_MIN: u32 = 16;
85pub const crypto_generichash_blake2b_KEYBYTES_MAX: u32 = 64;
86pub const crypto_generichash_blake2b_KEYBYTES: u32 = 32;
87pub const crypto_generichash_blake2b_SALTBYTES: u32 = 16;
88pub const crypto_generichash_blake2b_PERSONALBYTES: u32 = 16;
89pub const crypto_generichash_BYTES_MIN: u32 = 16;
90pub const crypto_generichash_BYTES_MAX: u32 = 64;
91pub const crypto_generichash_BYTES: u32 = 32;
92pub const crypto_generichash_KEYBYTES_MIN: u32 = 16;
93pub const crypto_generichash_KEYBYTES_MAX: u32 = 64;
94pub const crypto_generichash_KEYBYTES: u32 = 32;
95pub const crypto_generichash_PRIMITIVE: &'static [u8; 8usize] = b"blake2b\0";
96pub const crypto_hash_BYTES: u32 = 64;
97pub const crypto_hash_PRIMITIVE: &'static [u8; 7usize] = b"sha512\0";
98pub const crypto_kdf_blake2b_BYTES_MIN: u32 = 16;
99pub const crypto_kdf_blake2b_BYTES_MAX: u32 = 64;
100pub const crypto_kdf_blake2b_CONTEXTBYTES: u32 = 8;
101pub const crypto_kdf_blake2b_KEYBYTES: u32 = 32;
102pub const crypto_kdf_BYTES_MIN: u32 = 16;
103pub const crypto_kdf_BYTES_MAX: u32 = 64;
104pub const crypto_kdf_CONTEXTBYTES: u32 = 8;
105pub const crypto_kdf_KEYBYTES: u32 = 32;
106pub const crypto_kdf_PRIMITIVE: &'static [u8; 8usize] = b"blake2b\0";
107pub const crypto_kx_PUBLICKEYBYTES: u32 = 32;
108pub const crypto_kx_SECRETKEYBYTES: u32 = 32;
109pub const crypto_kx_SEEDBYTES: u32 = 32;
110pub const crypto_kx_SESSIONKEYBYTES: u32 = 32;
111pub const crypto_kx_PRIMITIVE: &'static [u8; 14usize] = b"x25519blake2b\0";
112pub const crypto_onetimeauth_poly1305_BYTES: u32 = 16;
113pub const crypto_onetimeauth_poly1305_KEYBYTES: u32 = 32;
114pub const crypto_onetimeauth_BYTES: u32 = 16;
115pub const crypto_onetimeauth_KEYBYTES: u32 = 32;
116pub const crypto_onetimeauth_PRIMITIVE: &'static [u8; 9usize] = b"poly1305\0";
117pub const crypto_pwhash_argon2i_ALG_ARGON2I13: u32 = 1;
118pub const crypto_pwhash_argon2i_BYTES_MIN: u32 = 16;
119pub const crypto_pwhash_argon2i_PASSWD_MIN: u32 = 0;
120pub const crypto_pwhash_argon2i_PASSWD_MAX: u32 = 4294967295;
121pub const crypto_pwhash_argon2i_SALTBYTES: u32 = 16;
122pub const crypto_pwhash_argon2i_STRBYTES: u32 = 128;
123pub const crypto_pwhash_argon2i_STRPREFIX: &'static [u8; 10usize] = b"$argon2i$\0";
124pub const crypto_pwhash_argon2i_OPSLIMIT_MIN: u32 = 3;
125pub const crypto_pwhash_argon2i_OPSLIMIT_MAX: u32 = 4294967295;
126pub const crypto_pwhash_argon2i_MEMLIMIT_MIN: u32 = 8192;
127pub const crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE: u32 = 4;
128pub const crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE: u32 = 33554432;
129pub const crypto_pwhash_argon2i_OPSLIMIT_MODERATE: u32 = 6;
130pub const crypto_pwhash_argon2i_MEMLIMIT_MODERATE: u32 = 134217728;
131pub const crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE: u32 = 8;
132pub const crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE: u32 = 536870912;
133pub const crypto_pwhash_argon2id_ALG_ARGON2ID13: u32 = 2;
134pub const crypto_pwhash_argon2id_BYTES_MIN: u32 = 16;
135pub const crypto_pwhash_argon2id_PASSWD_MIN: u32 = 0;
136pub const crypto_pwhash_argon2id_PASSWD_MAX: u32 = 4294967295;
137pub const crypto_pwhash_argon2id_SALTBYTES: u32 = 16;
138pub const crypto_pwhash_argon2id_STRBYTES: u32 = 128;
139pub const crypto_pwhash_argon2id_STRPREFIX: &'static [u8; 11usize] = b"$argon2id$\0";
140pub const crypto_pwhash_argon2id_OPSLIMIT_MIN: u32 = 1;
141pub const crypto_pwhash_argon2id_OPSLIMIT_MAX: u32 = 4294967295;
142pub const crypto_pwhash_argon2id_MEMLIMIT_MIN: u32 = 8192;
143pub const crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE: u32 = 2;
144pub const crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE: u32 = 67108864;
145pub const crypto_pwhash_argon2id_OPSLIMIT_MODERATE: u32 = 3;
146pub const crypto_pwhash_argon2id_MEMLIMIT_MODERATE: u32 = 268435456;
147pub const crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE: u32 = 4;
148pub const crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE: u32 = 1073741824;
149pub const crypto_pwhash_ALG_ARGON2I13: u32 = 1;
150pub const crypto_pwhash_ALG_ARGON2ID13: u32 = 2;
151pub const crypto_pwhash_ALG_DEFAULT: u32 = 2;
152pub const crypto_pwhash_BYTES_MIN: u32 = 16;
153pub const crypto_pwhash_PASSWD_MIN: u32 = 0;
154pub const crypto_pwhash_PASSWD_MAX: u32 = 4294967295;
155pub const crypto_pwhash_SALTBYTES: u32 = 16;
156pub const crypto_pwhash_STRBYTES: u32 = 128;
157pub const crypto_pwhash_STRPREFIX: &'static [u8; 11usize] = b"$argon2id$\0";
158pub const crypto_pwhash_OPSLIMIT_MIN: u32 = 1;
159pub const crypto_pwhash_OPSLIMIT_MAX: u32 = 4294967295;
160pub const crypto_pwhash_MEMLIMIT_MIN: u32 = 8192;
161pub const crypto_pwhash_OPSLIMIT_INTERACTIVE: u32 = 2;
162pub const crypto_pwhash_MEMLIMIT_INTERACTIVE: u32 = 67108864;
163pub const crypto_pwhash_OPSLIMIT_MODERATE: u32 = 3;
164pub const crypto_pwhash_MEMLIMIT_MODERATE: u32 = 268435456;
165pub const crypto_pwhash_OPSLIMIT_SENSITIVE: u32 = 4;
166pub const crypto_pwhash_MEMLIMIT_SENSITIVE: u32 = 1073741824;
167pub const crypto_pwhash_PRIMITIVE: &'static [u8; 8usize] = b"argon2i\0";
168pub const crypto_scalarmult_curve25519_BYTES: u32 = 32;
169pub const crypto_scalarmult_curve25519_SCALARBYTES: u32 = 32;
170pub const crypto_scalarmult_BYTES: u32 = 32;
171pub const crypto_scalarmult_SCALARBYTES: u32 = 32;
172pub const crypto_scalarmult_PRIMITIVE: &'static [u8; 11usize] = b"curve25519\0";
173pub const crypto_secretbox_xsalsa20poly1305_KEYBYTES: u32 = 32;
174pub const crypto_secretbox_xsalsa20poly1305_NONCEBYTES: u32 = 24;
175pub const crypto_secretbox_xsalsa20poly1305_MACBYTES: u32 = 16;
176pub const crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES: u32 = 16;
177pub const crypto_secretbox_xsalsa20poly1305_ZEROBYTES: u32 = 32;
178pub const crypto_secretbox_KEYBYTES: u32 = 32;
179pub const crypto_secretbox_NONCEBYTES: u32 = 24;
180pub const crypto_secretbox_MACBYTES: u32 = 16;
181pub const crypto_secretbox_PRIMITIVE: &'static [u8; 17usize] = b"xsalsa20poly1305\0";
182pub const crypto_secretbox_ZEROBYTES: u32 = 32;
183pub const crypto_secretbox_BOXZEROBYTES: u32 = 16;
184pub const crypto_stream_chacha20_KEYBYTES: u32 = 32;
185pub const crypto_stream_chacha20_NONCEBYTES: u32 = 8;
186pub const crypto_stream_chacha20_ietf_KEYBYTES: u32 = 32;
187pub const crypto_stream_chacha20_ietf_NONCEBYTES: u32 = 12;
188pub const crypto_stream_chacha20_IETF_KEYBYTES: u32 = 32;
189pub const crypto_stream_chacha20_IETF_NONCEBYTES: u32 = 12;
190pub const crypto_secretstream_xchacha20poly1305_ABYTES: u32 = 17;
191pub const crypto_secretstream_xchacha20poly1305_HEADERBYTES: u32 = 24;
192pub const crypto_secretstream_xchacha20poly1305_KEYBYTES: u32 = 32;
193pub const crypto_secretstream_xchacha20poly1305_TAG_MESSAGE: u32 = 0;
194pub const crypto_secretstream_xchacha20poly1305_TAG_PUSH: u32 = 1;
195pub const crypto_secretstream_xchacha20poly1305_TAG_REKEY: u32 = 2;
196pub const crypto_secretstream_xchacha20poly1305_TAG_FINAL: u32 = 3;
197pub const crypto_shorthash_siphash24_BYTES: u32 = 8;
198pub const crypto_shorthash_siphash24_KEYBYTES: u32 = 16;
199pub const crypto_shorthash_siphashx24_BYTES: u32 = 16;
200pub const crypto_shorthash_siphashx24_KEYBYTES: u32 = 16;
201pub const crypto_shorthash_BYTES: u32 = 8;
202pub const crypto_shorthash_KEYBYTES: u32 = 16;
203pub const crypto_shorthash_PRIMITIVE: &'static [u8; 10usize] = b"siphash24\0";
204pub const crypto_sign_ed25519_BYTES: u32 = 64;
205pub const crypto_sign_ed25519_SEEDBYTES: u32 = 32;
206pub const crypto_sign_ed25519_PUBLICKEYBYTES: u32 = 32;
207pub const crypto_sign_ed25519_SECRETKEYBYTES: u32 = 64;
208pub const crypto_sign_BYTES: u32 = 64;
209pub const crypto_sign_SEEDBYTES: u32 = 32;
210pub const crypto_sign_PUBLICKEYBYTES: u32 = 32;
211pub const crypto_sign_SECRETKEYBYTES: u32 = 64;
212pub const crypto_sign_PRIMITIVE: &'static [u8; 8usize] = b"ed25519\0";
213pub const crypto_stream_KEYBYTES: u32 = 32;
214pub const crypto_stream_NONCEBYTES: u32 = 24;
215pub const crypto_stream_PRIMITIVE: &'static [u8; 9usize] = b"xsalsa20\0";
216pub const crypto_stream_salsa20_KEYBYTES: u32 = 32;
217pub const crypto_stream_salsa20_NONCEBYTES: u32 = 8;
218pub const crypto_verify_16_BYTES: u32 = 16;
219pub const crypto_verify_32_BYTES: u32 = 32;
220pub const crypto_verify_64_BYTES: u32 = 64;
221pub const randombytes_SEEDBYTES: u32 = 32;
222pub const sodium_base64_VARIANT_ORIGINAL: u32 = 1;
223pub const sodium_base64_VARIANT_ORIGINAL_NO_PADDING: u32 = 3;
224pub const sodium_base64_VARIANT_URLSAFE: u32 = 5;
225pub const sodium_base64_VARIANT_URLSAFE_NO_PADDING: u32 = 7;
226pub const crypto_stream_xchacha20_KEYBYTES: u32 = 32;
227pub const crypto_stream_xchacha20_NONCEBYTES: u32 = 24;
228pub const crypto_box_curve25519xchacha20poly1305_SEEDBYTES: u32 = 32;
229pub const crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES: u32 = 32;
230pub const crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES: u32 = 32;
231pub const crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES: u32 = 32;
232pub const crypto_box_curve25519xchacha20poly1305_NONCEBYTES: u32 = 24;
233pub const crypto_box_curve25519xchacha20poly1305_MACBYTES: u32 = 16;
234pub const crypto_box_curve25519xchacha20poly1305_SEALBYTES: u32 = 48;
235pub const crypto_core_ed25519_BYTES: u32 = 32;
236pub const crypto_core_ed25519_UNIFORMBYTES: u32 = 32;
237pub const crypto_core_ed25519_HASHBYTES: u32 = 64;
238pub const crypto_core_ed25519_SCALARBYTES: u32 = 32;
239pub const crypto_core_ed25519_NONREDUCEDSCALARBYTES: u32 = 64;
240pub const crypto_core_ristretto255_BYTES: u32 = 32;
241pub const crypto_core_ristretto255_HASHBYTES: u32 = 64;
242pub const crypto_core_ristretto255_SCALARBYTES: u32 = 32;
243pub const crypto_core_ristretto255_NONREDUCEDSCALARBYTES: u32 = 64;
244pub const crypto_scalarmult_ed25519_BYTES: u32 = 32;
245pub const crypto_scalarmult_ed25519_SCALARBYTES: u32 = 32;
246pub const crypto_scalarmult_ristretto255_BYTES: u32 = 32;
247pub const crypto_scalarmult_ristretto255_SCALARBYTES: u32 = 32;
248pub const crypto_secretbox_xchacha20poly1305_KEYBYTES: u32 = 32;
249pub const crypto_secretbox_xchacha20poly1305_NONCEBYTES: u32 = 24;
250pub const crypto_secretbox_xchacha20poly1305_MACBYTES: u32 = 16;
251pub const crypto_pwhash_scryptsalsa208sha256_BYTES_MIN: u32 = 16;
252pub const crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN: u32 = 0;
253pub const crypto_pwhash_scryptsalsa208sha256_SALTBYTES: u32 = 32;
254pub const crypto_pwhash_scryptsalsa208sha256_STRBYTES: u32 = 102;
255pub const crypto_pwhash_scryptsalsa208sha256_STRPREFIX: &'static [u8; 4usize] = b"$7$\0";
256pub const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN: u32 = 32768;
257pub const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX: u32 = 4294967295;
258pub const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN: u32 = 16777216;
259pub const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE: u32 = 524288;
260pub const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE: u32 = 16777216;
261pub const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE: u32 = 33554432;
262pub const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE: u32 = 1073741824;
263pub const crypto_stream_salsa2012_KEYBYTES: u32 = 32;
264pub const crypto_stream_salsa2012_NONCEBYTES: u32 = 8;
265pub const crypto_stream_salsa208_KEYBYTES: u32 = 32;
266pub const crypto_stream_salsa208_NONCEBYTES: u32 = 8;
267pub type __uint8_t = libc::c_uchar;
268pub type __uint32_t = libc::c_uint;
269pub type __uint64_t = libc::c_ulong;
270extern "C" {
271    pub fn sodium_version_string() -> *const libc::c_char;
272}
273extern "C" {
274    pub fn sodium_library_version_major() -> libc::c_int;
275}
276extern "C" {
277    pub fn sodium_library_version_minor() -> libc::c_int;
278}
279extern "C" {
280    pub fn sodium_library_minimal() -> libc::c_int;
281}
282extern "C" {
283    pub fn sodium_init() -> libc::c_int;
284}
285extern "C" {
286    pub fn sodium_set_misuse_handler(
287        handler: ::core::option::Option<unsafe extern "C" fn()>,
288    ) -> libc::c_int;
289}
290extern "C" {
291    pub fn sodium_misuse();
292}
293extern "C" {
294    pub fn crypto_aead_aes256gcm_is_available() -> libc::c_int;
295}
296extern "C" {
297    pub fn crypto_aead_aes256gcm_keybytes() -> usize;
298}
299extern "C" {
300    pub fn crypto_aead_aes256gcm_nsecbytes() -> usize;
301}
302extern "C" {
303    pub fn crypto_aead_aes256gcm_npubbytes() -> usize;
304}
305extern "C" {
306    pub fn crypto_aead_aes256gcm_abytes() -> usize;
307}
308extern "C" {
309    pub fn crypto_aead_aes256gcm_messagebytes_max() -> usize;
310}
311#[repr(C)]
312#[repr(align(16))]
313#[derive(Copy, Clone)]
314pub struct crypto_aead_aes256gcm_state_ {
315    pub opaque: [libc::c_uchar; 512usize],
316}
317pub type crypto_aead_aes256gcm_state = crypto_aead_aes256gcm_state_;
318extern "C" {
319    pub fn crypto_aead_aes256gcm_statebytes() -> usize;
320}
321extern "C" {
322    pub fn crypto_aead_aes256gcm_encrypt(
323        c: *mut libc::c_uchar,
324        clen_p: *mut libc::c_ulonglong,
325        m: *const libc::c_uchar,
326        mlen: libc::c_ulonglong,
327        ad: *const libc::c_uchar,
328        adlen: libc::c_ulonglong,
329        nsec: *const libc::c_uchar,
330        npub: *const libc::c_uchar,
331        k: *const libc::c_uchar,
332    ) -> libc::c_int;
333}
334extern "C" {
335    pub fn crypto_aead_aes256gcm_decrypt(
336        m: *mut libc::c_uchar,
337        mlen_p: *mut libc::c_ulonglong,
338        nsec: *mut libc::c_uchar,
339        c: *const libc::c_uchar,
340        clen: libc::c_ulonglong,
341        ad: *const libc::c_uchar,
342        adlen: libc::c_ulonglong,
343        npub: *const libc::c_uchar,
344        k: *const libc::c_uchar,
345    ) -> libc::c_int;
346}
347extern "C" {
348    pub fn crypto_aead_aes256gcm_encrypt_detached(
349        c: *mut libc::c_uchar,
350        mac: *mut libc::c_uchar,
351        maclen_p: *mut libc::c_ulonglong,
352        m: *const libc::c_uchar,
353        mlen: libc::c_ulonglong,
354        ad: *const libc::c_uchar,
355        adlen: libc::c_ulonglong,
356        nsec: *const libc::c_uchar,
357        npub: *const libc::c_uchar,
358        k: *const libc::c_uchar,
359    ) -> libc::c_int;
360}
361extern "C" {
362    pub fn crypto_aead_aes256gcm_decrypt_detached(
363        m: *mut libc::c_uchar,
364        nsec: *mut libc::c_uchar,
365        c: *const libc::c_uchar,
366        clen: libc::c_ulonglong,
367        mac: *const libc::c_uchar,
368        ad: *const libc::c_uchar,
369        adlen: libc::c_ulonglong,
370        npub: *const libc::c_uchar,
371        k: *const libc::c_uchar,
372    ) -> libc::c_int;
373}
374extern "C" {
375    pub fn crypto_aead_aes256gcm_beforenm(
376        ctx_: *mut crypto_aead_aes256gcm_state,
377        k: *const libc::c_uchar,
378    ) -> libc::c_int;
379}
380extern "C" {
381    pub fn crypto_aead_aes256gcm_encrypt_afternm(
382        c: *mut libc::c_uchar,
383        clen_p: *mut libc::c_ulonglong,
384        m: *const libc::c_uchar,
385        mlen: libc::c_ulonglong,
386        ad: *const libc::c_uchar,
387        adlen: libc::c_ulonglong,
388        nsec: *const libc::c_uchar,
389        npub: *const libc::c_uchar,
390        ctx_: *const crypto_aead_aes256gcm_state,
391    ) -> libc::c_int;
392}
393extern "C" {
394    pub fn crypto_aead_aes256gcm_decrypt_afternm(
395        m: *mut libc::c_uchar,
396        mlen_p: *mut libc::c_ulonglong,
397        nsec: *mut libc::c_uchar,
398        c: *const libc::c_uchar,
399        clen: libc::c_ulonglong,
400        ad: *const libc::c_uchar,
401        adlen: libc::c_ulonglong,
402        npub: *const libc::c_uchar,
403        ctx_: *const crypto_aead_aes256gcm_state,
404    ) -> libc::c_int;
405}
406extern "C" {
407    pub fn crypto_aead_aes256gcm_encrypt_detached_afternm(
408        c: *mut libc::c_uchar,
409        mac: *mut libc::c_uchar,
410        maclen_p: *mut libc::c_ulonglong,
411        m: *const libc::c_uchar,
412        mlen: libc::c_ulonglong,
413        ad: *const libc::c_uchar,
414        adlen: libc::c_ulonglong,
415        nsec: *const libc::c_uchar,
416        npub: *const libc::c_uchar,
417        ctx_: *const crypto_aead_aes256gcm_state,
418    ) -> libc::c_int;
419}
420extern "C" {
421    pub fn crypto_aead_aes256gcm_decrypt_detached_afternm(
422        m: *mut libc::c_uchar,
423        nsec: *mut libc::c_uchar,
424        c: *const libc::c_uchar,
425        clen: libc::c_ulonglong,
426        mac: *const libc::c_uchar,
427        ad: *const libc::c_uchar,
428        adlen: libc::c_ulonglong,
429        npub: *const libc::c_uchar,
430        ctx_: *const crypto_aead_aes256gcm_state,
431    ) -> libc::c_int;
432}
433extern "C" {
434    pub fn crypto_aead_aes256gcm_keygen(k: *mut libc::c_uchar);
435}
436extern "C" {
437    pub fn crypto_aead_chacha20poly1305_ietf_keybytes() -> usize;
438}
439extern "C" {
440    pub fn crypto_aead_chacha20poly1305_ietf_nsecbytes() -> usize;
441}
442extern "C" {
443    pub fn crypto_aead_chacha20poly1305_ietf_npubbytes() -> usize;
444}
445extern "C" {
446    pub fn crypto_aead_chacha20poly1305_ietf_abytes() -> usize;
447}
448extern "C" {
449    pub fn crypto_aead_chacha20poly1305_ietf_messagebytes_max() -> usize;
450}
451extern "C" {
452    pub fn crypto_aead_chacha20poly1305_ietf_encrypt(
453        c: *mut libc::c_uchar,
454        clen_p: *mut libc::c_ulonglong,
455        m: *const libc::c_uchar,
456        mlen: libc::c_ulonglong,
457        ad: *const libc::c_uchar,
458        adlen: libc::c_ulonglong,
459        nsec: *const libc::c_uchar,
460        npub: *const libc::c_uchar,
461        k: *const libc::c_uchar,
462    ) -> libc::c_int;
463}
464extern "C" {
465    pub fn crypto_aead_chacha20poly1305_ietf_decrypt(
466        m: *mut libc::c_uchar,
467        mlen_p: *mut libc::c_ulonglong,
468        nsec: *mut libc::c_uchar,
469        c: *const libc::c_uchar,
470        clen: libc::c_ulonglong,
471        ad: *const libc::c_uchar,
472        adlen: libc::c_ulonglong,
473        npub: *const libc::c_uchar,
474        k: *const libc::c_uchar,
475    ) -> libc::c_int;
476}
477extern "C" {
478    pub fn crypto_aead_chacha20poly1305_ietf_encrypt_detached(
479        c: *mut libc::c_uchar,
480        mac: *mut libc::c_uchar,
481        maclen_p: *mut libc::c_ulonglong,
482        m: *const libc::c_uchar,
483        mlen: libc::c_ulonglong,
484        ad: *const libc::c_uchar,
485        adlen: libc::c_ulonglong,
486        nsec: *const libc::c_uchar,
487        npub: *const libc::c_uchar,
488        k: *const libc::c_uchar,
489    ) -> libc::c_int;
490}
491extern "C" {
492    pub fn crypto_aead_chacha20poly1305_ietf_decrypt_detached(
493        m: *mut libc::c_uchar,
494        nsec: *mut libc::c_uchar,
495        c: *const libc::c_uchar,
496        clen: libc::c_ulonglong,
497        mac: *const libc::c_uchar,
498        ad: *const libc::c_uchar,
499        adlen: libc::c_ulonglong,
500        npub: *const libc::c_uchar,
501        k: *const libc::c_uchar,
502    ) -> libc::c_int;
503}
504extern "C" {
505    pub fn crypto_aead_chacha20poly1305_ietf_keygen(k: *mut libc::c_uchar);
506}
507extern "C" {
508    pub fn crypto_aead_chacha20poly1305_keybytes() -> usize;
509}
510extern "C" {
511    pub fn crypto_aead_chacha20poly1305_nsecbytes() -> usize;
512}
513extern "C" {
514    pub fn crypto_aead_chacha20poly1305_npubbytes() -> usize;
515}
516extern "C" {
517    pub fn crypto_aead_chacha20poly1305_abytes() -> usize;
518}
519extern "C" {
520    pub fn crypto_aead_chacha20poly1305_messagebytes_max() -> usize;
521}
522extern "C" {
523    pub fn crypto_aead_chacha20poly1305_encrypt(
524        c: *mut libc::c_uchar,
525        clen_p: *mut libc::c_ulonglong,
526        m: *const libc::c_uchar,
527        mlen: libc::c_ulonglong,
528        ad: *const libc::c_uchar,
529        adlen: libc::c_ulonglong,
530        nsec: *const libc::c_uchar,
531        npub: *const libc::c_uchar,
532        k: *const libc::c_uchar,
533    ) -> libc::c_int;
534}
535extern "C" {
536    pub fn crypto_aead_chacha20poly1305_decrypt(
537        m: *mut libc::c_uchar,
538        mlen_p: *mut libc::c_ulonglong,
539        nsec: *mut libc::c_uchar,
540        c: *const libc::c_uchar,
541        clen: libc::c_ulonglong,
542        ad: *const libc::c_uchar,
543        adlen: libc::c_ulonglong,
544        npub: *const libc::c_uchar,
545        k: *const libc::c_uchar,
546    ) -> libc::c_int;
547}
548extern "C" {
549    pub fn crypto_aead_chacha20poly1305_encrypt_detached(
550        c: *mut libc::c_uchar,
551        mac: *mut libc::c_uchar,
552        maclen_p: *mut libc::c_ulonglong,
553        m: *const libc::c_uchar,
554        mlen: libc::c_ulonglong,
555        ad: *const libc::c_uchar,
556        adlen: libc::c_ulonglong,
557        nsec: *const libc::c_uchar,
558        npub: *const libc::c_uchar,
559        k: *const libc::c_uchar,
560    ) -> libc::c_int;
561}
562extern "C" {
563    pub fn crypto_aead_chacha20poly1305_decrypt_detached(
564        m: *mut libc::c_uchar,
565        nsec: *mut libc::c_uchar,
566        c: *const libc::c_uchar,
567        clen: libc::c_ulonglong,
568        mac: *const libc::c_uchar,
569        ad: *const libc::c_uchar,
570        adlen: libc::c_ulonglong,
571        npub: *const libc::c_uchar,
572        k: *const libc::c_uchar,
573    ) -> libc::c_int;
574}
575extern "C" {
576    pub fn crypto_aead_chacha20poly1305_keygen(k: *mut libc::c_uchar);
577}
578extern "C" {
579    pub fn crypto_aead_xchacha20poly1305_ietf_keybytes() -> usize;
580}
581extern "C" {
582    pub fn crypto_aead_xchacha20poly1305_ietf_nsecbytes() -> usize;
583}
584extern "C" {
585    pub fn crypto_aead_xchacha20poly1305_ietf_npubbytes() -> usize;
586}
587extern "C" {
588    pub fn crypto_aead_xchacha20poly1305_ietf_abytes() -> usize;
589}
590extern "C" {
591    pub fn crypto_aead_xchacha20poly1305_ietf_messagebytes_max() -> usize;
592}
593extern "C" {
594    pub fn crypto_aead_xchacha20poly1305_ietf_encrypt(
595        c: *mut libc::c_uchar,
596        clen_p: *mut libc::c_ulonglong,
597        m: *const libc::c_uchar,
598        mlen: libc::c_ulonglong,
599        ad: *const libc::c_uchar,
600        adlen: libc::c_ulonglong,
601        nsec: *const libc::c_uchar,
602        npub: *const libc::c_uchar,
603        k: *const libc::c_uchar,
604    ) -> libc::c_int;
605}
606extern "C" {
607    pub fn crypto_aead_xchacha20poly1305_ietf_decrypt(
608        m: *mut libc::c_uchar,
609        mlen_p: *mut libc::c_ulonglong,
610        nsec: *mut libc::c_uchar,
611        c: *const libc::c_uchar,
612        clen: libc::c_ulonglong,
613        ad: *const libc::c_uchar,
614        adlen: libc::c_ulonglong,
615        npub: *const libc::c_uchar,
616        k: *const libc::c_uchar,
617    ) -> libc::c_int;
618}
619extern "C" {
620    pub fn crypto_aead_xchacha20poly1305_ietf_encrypt_detached(
621        c: *mut libc::c_uchar,
622        mac: *mut libc::c_uchar,
623        maclen_p: *mut libc::c_ulonglong,
624        m: *const libc::c_uchar,
625        mlen: libc::c_ulonglong,
626        ad: *const libc::c_uchar,
627        adlen: libc::c_ulonglong,
628        nsec: *const libc::c_uchar,
629        npub: *const libc::c_uchar,
630        k: *const libc::c_uchar,
631    ) -> libc::c_int;
632}
633extern "C" {
634    pub fn crypto_aead_xchacha20poly1305_ietf_decrypt_detached(
635        m: *mut libc::c_uchar,
636        nsec: *mut libc::c_uchar,
637        c: *const libc::c_uchar,
638        clen: libc::c_ulonglong,
639        mac: *const libc::c_uchar,
640        ad: *const libc::c_uchar,
641        adlen: libc::c_ulonglong,
642        npub: *const libc::c_uchar,
643        k: *const libc::c_uchar,
644    ) -> libc::c_int;
645}
646extern "C" {
647    pub fn crypto_aead_xchacha20poly1305_ietf_keygen(k: *mut libc::c_uchar);
648}
649#[repr(C)]
650#[derive(Copy, Clone)]
651pub struct crypto_hash_sha512_state {
652    pub state: [u64; 8usize],
653    pub count: [u64; 2usize],
654    pub buf: [u8; 128usize],
655}
656extern "C" {
657    pub fn crypto_hash_sha512_statebytes() -> usize;
658}
659extern "C" {
660    pub fn crypto_hash_sha512_bytes() -> usize;
661}
662extern "C" {
663    pub fn crypto_hash_sha512(
664        out: *mut libc::c_uchar,
665        in_: *const libc::c_uchar,
666        inlen: libc::c_ulonglong,
667    ) -> libc::c_int;
668}
669extern "C" {
670    pub fn crypto_hash_sha512_init(state: *mut crypto_hash_sha512_state) -> libc::c_int;
671}
672extern "C" {
673    pub fn crypto_hash_sha512_update(
674        state: *mut crypto_hash_sha512_state,
675        in_: *const libc::c_uchar,
676        inlen: libc::c_ulonglong,
677    ) -> libc::c_int;
678}
679extern "C" {
680    pub fn crypto_hash_sha512_final(
681        state: *mut crypto_hash_sha512_state,
682        out: *mut libc::c_uchar,
683    ) -> libc::c_int;
684}
685extern "C" {
686    pub fn crypto_auth_hmacsha512_bytes() -> usize;
687}
688extern "C" {
689    pub fn crypto_auth_hmacsha512_keybytes() -> usize;
690}
691extern "C" {
692    pub fn crypto_auth_hmacsha512(
693        out: *mut libc::c_uchar,
694        in_: *const libc::c_uchar,
695        inlen: libc::c_ulonglong,
696        k: *const libc::c_uchar,
697    ) -> libc::c_int;
698}
699extern "C" {
700    pub fn crypto_auth_hmacsha512_verify(
701        h: *const libc::c_uchar,
702        in_: *const libc::c_uchar,
703        inlen: libc::c_ulonglong,
704        k: *const libc::c_uchar,
705    ) -> libc::c_int;
706}
707#[repr(C)]
708#[derive(Copy, Clone)]
709pub struct crypto_auth_hmacsha512_state {
710    pub ictx: crypto_hash_sha512_state,
711    pub octx: crypto_hash_sha512_state,
712}
713extern "C" {
714    pub fn crypto_auth_hmacsha512_statebytes() -> usize;
715}
716extern "C" {
717    pub fn crypto_auth_hmacsha512_init(
718        state: *mut crypto_auth_hmacsha512_state,
719        key: *const libc::c_uchar,
720        keylen: usize,
721    ) -> libc::c_int;
722}
723extern "C" {
724    pub fn crypto_auth_hmacsha512_update(
725        state: *mut crypto_auth_hmacsha512_state,
726        in_: *const libc::c_uchar,
727        inlen: libc::c_ulonglong,
728    ) -> libc::c_int;
729}
730extern "C" {
731    pub fn crypto_auth_hmacsha512_final(
732        state: *mut crypto_auth_hmacsha512_state,
733        out: *mut libc::c_uchar,
734    ) -> libc::c_int;
735}
736extern "C" {
737    pub fn crypto_auth_hmacsha512_keygen(k: *mut libc::c_uchar);
738}
739extern "C" {
740    pub fn crypto_auth_hmacsha512256_bytes() -> usize;
741}
742extern "C" {
743    pub fn crypto_auth_hmacsha512256_keybytes() -> usize;
744}
745extern "C" {
746    pub fn crypto_auth_hmacsha512256(
747        out: *mut libc::c_uchar,
748        in_: *const libc::c_uchar,
749        inlen: libc::c_ulonglong,
750        k: *const libc::c_uchar,
751    ) -> libc::c_int;
752}
753extern "C" {
754    pub fn crypto_auth_hmacsha512256_verify(
755        h: *const libc::c_uchar,
756        in_: *const libc::c_uchar,
757        inlen: libc::c_ulonglong,
758        k: *const libc::c_uchar,
759    ) -> libc::c_int;
760}
761pub type crypto_auth_hmacsha512256_state = crypto_auth_hmacsha512_state;
762extern "C" {
763    pub fn crypto_auth_hmacsha512256_statebytes() -> usize;
764}
765extern "C" {
766    pub fn crypto_auth_hmacsha512256_init(
767        state: *mut crypto_auth_hmacsha512256_state,
768        key: *const libc::c_uchar,
769        keylen: usize,
770    ) -> libc::c_int;
771}
772extern "C" {
773    pub fn crypto_auth_hmacsha512256_update(
774        state: *mut crypto_auth_hmacsha512256_state,
775        in_: *const libc::c_uchar,
776        inlen: libc::c_ulonglong,
777    ) -> libc::c_int;
778}
779extern "C" {
780    pub fn crypto_auth_hmacsha512256_final(
781        state: *mut crypto_auth_hmacsha512256_state,
782        out: *mut libc::c_uchar,
783    ) -> libc::c_int;
784}
785extern "C" {
786    pub fn crypto_auth_hmacsha512256_keygen(k: *mut libc::c_uchar);
787}
788extern "C" {
789    pub fn crypto_auth_bytes() -> usize;
790}
791extern "C" {
792    pub fn crypto_auth_keybytes() -> usize;
793}
794extern "C" {
795    pub fn crypto_auth_primitive() -> *const libc::c_char;
796}
797extern "C" {
798    pub fn crypto_auth(
799        out: *mut libc::c_uchar,
800        in_: *const libc::c_uchar,
801        inlen: libc::c_ulonglong,
802        k: *const libc::c_uchar,
803    ) -> libc::c_int;
804}
805extern "C" {
806    pub fn crypto_auth_verify(
807        h: *const libc::c_uchar,
808        in_: *const libc::c_uchar,
809        inlen: libc::c_ulonglong,
810        k: *const libc::c_uchar,
811    ) -> libc::c_int;
812}
813extern "C" {
814    pub fn crypto_auth_keygen(k: *mut libc::c_uchar);
815}
816#[repr(C)]
817#[derive(Copy, Clone)]
818pub struct crypto_hash_sha256_state {
819    pub state: [u32; 8usize],
820    pub count: u64,
821    pub buf: [u8; 64usize],
822}
823extern "C" {
824    pub fn crypto_hash_sha256_statebytes() -> usize;
825}
826extern "C" {
827    pub fn crypto_hash_sha256_bytes() -> usize;
828}
829extern "C" {
830    pub fn crypto_hash_sha256(
831        out: *mut libc::c_uchar,
832        in_: *const libc::c_uchar,
833        inlen: libc::c_ulonglong,
834    ) -> libc::c_int;
835}
836extern "C" {
837    pub fn crypto_hash_sha256_init(state: *mut crypto_hash_sha256_state) -> libc::c_int;
838}
839extern "C" {
840    pub fn crypto_hash_sha256_update(
841        state: *mut crypto_hash_sha256_state,
842        in_: *const libc::c_uchar,
843        inlen: libc::c_ulonglong,
844    ) -> libc::c_int;
845}
846extern "C" {
847    pub fn crypto_hash_sha256_final(
848        state: *mut crypto_hash_sha256_state,
849        out: *mut libc::c_uchar,
850    ) -> libc::c_int;
851}
852extern "C" {
853    pub fn crypto_auth_hmacsha256_bytes() -> usize;
854}
855extern "C" {
856    pub fn crypto_auth_hmacsha256_keybytes() -> usize;
857}
858extern "C" {
859    pub fn crypto_auth_hmacsha256(
860        out: *mut libc::c_uchar,
861        in_: *const libc::c_uchar,
862        inlen: libc::c_ulonglong,
863        k: *const libc::c_uchar,
864    ) -> libc::c_int;
865}
866extern "C" {
867    pub fn crypto_auth_hmacsha256_verify(
868        h: *const libc::c_uchar,
869        in_: *const libc::c_uchar,
870        inlen: libc::c_ulonglong,
871        k: *const libc::c_uchar,
872    ) -> libc::c_int;
873}
874#[repr(C)]
875#[derive(Copy, Clone)]
876pub struct crypto_auth_hmacsha256_state {
877    pub ictx: crypto_hash_sha256_state,
878    pub octx: crypto_hash_sha256_state,
879}
880extern "C" {
881    pub fn crypto_auth_hmacsha256_statebytes() -> usize;
882}
883extern "C" {
884    pub fn crypto_auth_hmacsha256_init(
885        state: *mut crypto_auth_hmacsha256_state,
886        key: *const libc::c_uchar,
887        keylen: usize,
888    ) -> libc::c_int;
889}
890extern "C" {
891    pub fn crypto_auth_hmacsha256_update(
892        state: *mut crypto_auth_hmacsha256_state,
893        in_: *const libc::c_uchar,
894        inlen: libc::c_ulonglong,
895    ) -> libc::c_int;
896}
897extern "C" {
898    pub fn crypto_auth_hmacsha256_final(
899        state: *mut crypto_auth_hmacsha256_state,
900        out: *mut libc::c_uchar,
901    ) -> libc::c_int;
902}
903extern "C" {
904    pub fn crypto_auth_hmacsha256_keygen(k: *mut libc::c_uchar);
905}
906extern "C" {
907    pub fn crypto_stream_xsalsa20_keybytes() -> usize;
908}
909extern "C" {
910    pub fn crypto_stream_xsalsa20_noncebytes() -> usize;
911}
912extern "C" {
913    pub fn crypto_stream_xsalsa20_messagebytes_max() -> usize;
914}
915extern "C" {
916    pub fn crypto_stream_xsalsa20(
917        c: *mut libc::c_uchar,
918        clen: libc::c_ulonglong,
919        n: *const libc::c_uchar,
920        k: *const libc::c_uchar,
921    ) -> libc::c_int;
922}
923extern "C" {
924    pub fn crypto_stream_xsalsa20_xor(
925        c: *mut libc::c_uchar,
926        m: *const libc::c_uchar,
927        mlen: libc::c_ulonglong,
928        n: *const libc::c_uchar,
929        k: *const libc::c_uchar,
930    ) -> libc::c_int;
931}
932extern "C" {
933    pub fn crypto_stream_xsalsa20_xor_ic(
934        c: *mut libc::c_uchar,
935        m: *const libc::c_uchar,
936        mlen: libc::c_ulonglong,
937        n: *const libc::c_uchar,
938        ic: u64,
939        k: *const libc::c_uchar,
940    ) -> libc::c_int;
941}
942extern "C" {
943    pub fn crypto_stream_xsalsa20_keygen(k: *mut libc::c_uchar);
944}
945extern "C" {
946    pub fn crypto_box_curve25519xsalsa20poly1305_seedbytes() -> usize;
947}
948extern "C" {
949    pub fn crypto_box_curve25519xsalsa20poly1305_publickeybytes() -> usize;
950}
951extern "C" {
952    pub fn crypto_box_curve25519xsalsa20poly1305_secretkeybytes() -> usize;
953}
954extern "C" {
955    pub fn crypto_box_curve25519xsalsa20poly1305_beforenmbytes() -> usize;
956}
957extern "C" {
958    pub fn crypto_box_curve25519xsalsa20poly1305_noncebytes() -> usize;
959}
960extern "C" {
961    pub fn crypto_box_curve25519xsalsa20poly1305_macbytes() -> usize;
962}
963extern "C" {
964    pub fn crypto_box_curve25519xsalsa20poly1305_messagebytes_max() -> usize;
965}
966extern "C" {
967    pub fn crypto_box_curve25519xsalsa20poly1305_seed_keypair(
968        pk: *mut libc::c_uchar,
969        sk: *mut libc::c_uchar,
970        seed: *const libc::c_uchar,
971    ) -> libc::c_int;
972}
973extern "C" {
974    pub fn crypto_box_curve25519xsalsa20poly1305_keypair(
975        pk: *mut libc::c_uchar,
976        sk: *mut libc::c_uchar,
977    ) -> libc::c_int;
978}
979extern "C" {
980    pub fn crypto_box_curve25519xsalsa20poly1305_beforenm(
981        k: *mut libc::c_uchar,
982        pk: *const libc::c_uchar,
983        sk: *const libc::c_uchar,
984    ) -> libc::c_int;
985}
986extern "C" {
987    pub fn crypto_box_curve25519xsalsa20poly1305_boxzerobytes() -> usize;
988}
989extern "C" {
990    pub fn crypto_box_curve25519xsalsa20poly1305_zerobytes() -> usize;
991}
992extern "C" {
993    pub fn crypto_box_curve25519xsalsa20poly1305(
994        c: *mut libc::c_uchar,
995        m: *const libc::c_uchar,
996        mlen: libc::c_ulonglong,
997        n: *const libc::c_uchar,
998        pk: *const libc::c_uchar,
999        sk: *const libc::c_uchar,
1000    ) -> libc::c_int;
1001}
1002extern "C" {
1003    pub fn crypto_box_curve25519xsalsa20poly1305_open(
1004        m: *mut libc::c_uchar,
1005        c: *const libc::c_uchar,
1006        clen: libc::c_ulonglong,
1007        n: *const libc::c_uchar,
1008        pk: *const libc::c_uchar,
1009        sk: *const libc::c_uchar,
1010    ) -> libc::c_int;
1011}
1012extern "C" {
1013    pub fn crypto_box_curve25519xsalsa20poly1305_afternm(
1014        c: *mut libc::c_uchar,
1015        m: *const libc::c_uchar,
1016        mlen: libc::c_ulonglong,
1017        n: *const libc::c_uchar,
1018        k: *const libc::c_uchar,
1019    ) -> libc::c_int;
1020}
1021extern "C" {
1022    pub fn crypto_box_curve25519xsalsa20poly1305_open_afternm(
1023        m: *mut libc::c_uchar,
1024        c: *const libc::c_uchar,
1025        clen: libc::c_ulonglong,
1026        n: *const libc::c_uchar,
1027        k: *const libc::c_uchar,
1028    ) -> libc::c_int;
1029}
1030extern "C" {
1031    pub fn crypto_box_seedbytes() -> usize;
1032}
1033extern "C" {
1034    pub fn crypto_box_publickeybytes() -> usize;
1035}
1036extern "C" {
1037    pub fn crypto_box_secretkeybytes() -> usize;
1038}
1039extern "C" {
1040    pub fn crypto_box_noncebytes() -> usize;
1041}
1042extern "C" {
1043    pub fn crypto_box_macbytes() -> usize;
1044}
1045extern "C" {
1046    pub fn crypto_box_messagebytes_max() -> usize;
1047}
1048extern "C" {
1049    pub fn crypto_box_primitive() -> *const libc::c_char;
1050}
1051extern "C" {
1052    pub fn crypto_box_seed_keypair(
1053        pk: *mut libc::c_uchar,
1054        sk: *mut libc::c_uchar,
1055        seed: *const libc::c_uchar,
1056    ) -> libc::c_int;
1057}
1058extern "C" {
1059    pub fn crypto_box_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int;
1060}
1061extern "C" {
1062    pub fn crypto_box_easy(
1063        c: *mut libc::c_uchar,
1064        m: *const libc::c_uchar,
1065        mlen: libc::c_ulonglong,
1066        n: *const libc::c_uchar,
1067        pk: *const libc::c_uchar,
1068        sk: *const libc::c_uchar,
1069    ) -> libc::c_int;
1070}
1071extern "C" {
1072    pub fn crypto_box_open_easy(
1073        m: *mut libc::c_uchar,
1074        c: *const libc::c_uchar,
1075        clen: libc::c_ulonglong,
1076        n: *const libc::c_uchar,
1077        pk: *const libc::c_uchar,
1078        sk: *const libc::c_uchar,
1079    ) -> libc::c_int;
1080}
1081extern "C" {
1082    pub fn crypto_box_detached(
1083        c: *mut libc::c_uchar,
1084        mac: *mut libc::c_uchar,
1085        m: *const libc::c_uchar,
1086        mlen: libc::c_ulonglong,
1087        n: *const libc::c_uchar,
1088        pk: *const libc::c_uchar,
1089        sk: *const libc::c_uchar,
1090    ) -> libc::c_int;
1091}
1092extern "C" {
1093    pub fn crypto_box_open_detached(
1094        m: *mut libc::c_uchar,
1095        c: *const libc::c_uchar,
1096        mac: *const libc::c_uchar,
1097        clen: libc::c_ulonglong,
1098        n: *const libc::c_uchar,
1099        pk: *const libc::c_uchar,
1100        sk: *const libc::c_uchar,
1101    ) -> libc::c_int;
1102}
1103extern "C" {
1104    pub fn crypto_box_beforenmbytes() -> usize;
1105}
1106extern "C" {
1107    pub fn crypto_box_beforenm(
1108        k: *mut libc::c_uchar,
1109        pk: *const libc::c_uchar,
1110        sk: *const libc::c_uchar,
1111    ) -> libc::c_int;
1112}
1113extern "C" {
1114    pub fn crypto_box_easy_afternm(
1115        c: *mut libc::c_uchar,
1116        m: *const libc::c_uchar,
1117        mlen: libc::c_ulonglong,
1118        n: *const libc::c_uchar,
1119        k: *const libc::c_uchar,
1120    ) -> libc::c_int;
1121}
1122extern "C" {
1123    pub fn crypto_box_open_easy_afternm(
1124        m: *mut libc::c_uchar,
1125        c: *const libc::c_uchar,
1126        clen: libc::c_ulonglong,
1127        n: *const libc::c_uchar,
1128        k: *const libc::c_uchar,
1129    ) -> libc::c_int;
1130}
1131extern "C" {
1132    pub fn crypto_box_detached_afternm(
1133        c: *mut libc::c_uchar,
1134        mac: *mut libc::c_uchar,
1135        m: *const libc::c_uchar,
1136        mlen: libc::c_ulonglong,
1137        n: *const libc::c_uchar,
1138        k: *const libc::c_uchar,
1139    ) -> libc::c_int;
1140}
1141extern "C" {
1142    pub fn crypto_box_open_detached_afternm(
1143        m: *mut libc::c_uchar,
1144        c: *const libc::c_uchar,
1145        mac: *const libc::c_uchar,
1146        clen: libc::c_ulonglong,
1147        n: *const libc::c_uchar,
1148        k: *const libc::c_uchar,
1149    ) -> libc::c_int;
1150}
1151extern "C" {
1152    pub fn crypto_box_sealbytes() -> usize;
1153}
1154extern "C" {
1155    pub fn crypto_box_seal(
1156        c: *mut libc::c_uchar,
1157        m: *const libc::c_uchar,
1158        mlen: libc::c_ulonglong,
1159        pk: *const libc::c_uchar,
1160    ) -> libc::c_int;
1161}
1162extern "C" {
1163    pub fn crypto_box_seal_open(
1164        m: *mut libc::c_uchar,
1165        c: *const libc::c_uchar,
1166        clen: libc::c_ulonglong,
1167        pk: *const libc::c_uchar,
1168        sk: *const libc::c_uchar,
1169    ) -> libc::c_int;
1170}
1171extern "C" {
1172    pub fn crypto_box_zerobytes() -> usize;
1173}
1174extern "C" {
1175    pub fn crypto_box_boxzerobytes() -> usize;
1176}
1177extern "C" {
1178    pub fn crypto_box(
1179        c: *mut libc::c_uchar,
1180        m: *const libc::c_uchar,
1181        mlen: libc::c_ulonglong,
1182        n: *const libc::c_uchar,
1183        pk: *const libc::c_uchar,
1184        sk: *const libc::c_uchar,
1185    ) -> libc::c_int;
1186}
1187extern "C" {
1188    pub fn crypto_box_open(
1189        m: *mut libc::c_uchar,
1190        c: *const libc::c_uchar,
1191        clen: libc::c_ulonglong,
1192        n: *const libc::c_uchar,
1193        pk: *const libc::c_uchar,
1194        sk: *const libc::c_uchar,
1195    ) -> libc::c_int;
1196}
1197extern "C" {
1198    pub fn crypto_box_afternm(
1199        c: *mut libc::c_uchar,
1200        m: *const libc::c_uchar,
1201        mlen: libc::c_ulonglong,
1202        n: *const libc::c_uchar,
1203        k: *const libc::c_uchar,
1204    ) -> libc::c_int;
1205}
1206extern "C" {
1207    pub fn crypto_box_open_afternm(
1208        m: *mut libc::c_uchar,
1209        c: *const libc::c_uchar,
1210        clen: libc::c_ulonglong,
1211        n: *const libc::c_uchar,
1212        k: *const libc::c_uchar,
1213    ) -> libc::c_int;
1214}
1215extern "C" {
1216    pub fn crypto_core_hsalsa20_outputbytes() -> usize;
1217}
1218extern "C" {
1219    pub fn crypto_core_hsalsa20_inputbytes() -> usize;
1220}
1221extern "C" {
1222    pub fn crypto_core_hsalsa20_keybytes() -> usize;
1223}
1224extern "C" {
1225    pub fn crypto_core_hsalsa20_constbytes() -> usize;
1226}
1227extern "C" {
1228    pub fn crypto_core_hsalsa20(
1229        out: *mut libc::c_uchar,
1230        in_: *const libc::c_uchar,
1231        k: *const libc::c_uchar,
1232        c: *const libc::c_uchar,
1233    ) -> libc::c_int;
1234}
1235extern "C" {
1236    pub fn crypto_core_hchacha20_outputbytes() -> usize;
1237}
1238extern "C" {
1239    pub fn crypto_core_hchacha20_inputbytes() -> usize;
1240}
1241extern "C" {
1242    pub fn crypto_core_hchacha20_keybytes() -> usize;
1243}
1244extern "C" {
1245    pub fn crypto_core_hchacha20_constbytes() -> usize;
1246}
1247extern "C" {
1248    pub fn crypto_core_hchacha20(
1249        out: *mut libc::c_uchar,
1250        in_: *const libc::c_uchar,
1251        k: *const libc::c_uchar,
1252        c: *const libc::c_uchar,
1253    ) -> libc::c_int;
1254}
1255extern "C" {
1256    pub fn crypto_core_salsa20_outputbytes() -> usize;
1257}
1258extern "C" {
1259    pub fn crypto_core_salsa20_inputbytes() -> usize;
1260}
1261extern "C" {
1262    pub fn crypto_core_salsa20_keybytes() -> usize;
1263}
1264extern "C" {
1265    pub fn crypto_core_salsa20_constbytes() -> usize;
1266}
1267extern "C" {
1268    pub fn crypto_core_salsa20(
1269        out: *mut libc::c_uchar,
1270        in_: *const libc::c_uchar,
1271        k: *const libc::c_uchar,
1272        c: *const libc::c_uchar,
1273    ) -> libc::c_int;
1274}
1275extern "C" {
1276    pub fn crypto_core_salsa2012_outputbytes() -> usize;
1277}
1278extern "C" {
1279    pub fn crypto_core_salsa2012_inputbytes() -> usize;
1280}
1281extern "C" {
1282    pub fn crypto_core_salsa2012_keybytes() -> usize;
1283}
1284extern "C" {
1285    pub fn crypto_core_salsa2012_constbytes() -> usize;
1286}
1287extern "C" {
1288    pub fn crypto_core_salsa2012(
1289        out: *mut libc::c_uchar,
1290        in_: *const libc::c_uchar,
1291        k: *const libc::c_uchar,
1292        c: *const libc::c_uchar,
1293    ) -> libc::c_int;
1294}
1295extern "C" {
1296    pub fn crypto_core_salsa208_outputbytes() -> usize;
1297}
1298extern "C" {
1299    pub fn crypto_core_salsa208_inputbytes() -> usize;
1300}
1301extern "C" {
1302    pub fn crypto_core_salsa208_keybytes() -> usize;
1303}
1304extern "C" {
1305    pub fn crypto_core_salsa208_constbytes() -> usize;
1306}
1307extern "C" {
1308    pub fn crypto_core_salsa208(
1309        out: *mut libc::c_uchar,
1310        in_: *const libc::c_uchar,
1311        k: *const libc::c_uchar,
1312        c: *const libc::c_uchar,
1313    ) -> libc::c_int;
1314}
1315#[repr(C)]
1316#[repr(align(64))]
1317#[derive(Copy, Clone)]
1318pub struct crypto_generichash_blake2b_state {
1319    pub opaque: [libc::c_uchar; 384usize],
1320}
1321extern "C" {
1322    pub fn crypto_generichash_blake2b_bytes_min() -> usize;
1323}
1324extern "C" {
1325    pub fn crypto_generichash_blake2b_bytes_max() -> usize;
1326}
1327extern "C" {
1328    pub fn crypto_generichash_blake2b_bytes() -> usize;
1329}
1330extern "C" {
1331    pub fn crypto_generichash_blake2b_keybytes_min() -> usize;
1332}
1333extern "C" {
1334    pub fn crypto_generichash_blake2b_keybytes_max() -> usize;
1335}
1336extern "C" {
1337    pub fn crypto_generichash_blake2b_keybytes() -> usize;
1338}
1339extern "C" {
1340    pub fn crypto_generichash_blake2b_saltbytes() -> usize;
1341}
1342extern "C" {
1343    pub fn crypto_generichash_blake2b_personalbytes() -> usize;
1344}
1345extern "C" {
1346    pub fn crypto_generichash_blake2b_statebytes() -> usize;
1347}
1348extern "C" {
1349    pub fn crypto_generichash_blake2b(
1350        out: *mut libc::c_uchar,
1351        outlen: usize,
1352        in_: *const libc::c_uchar,
1353        inlen: libc::c_ulonglong,
1354        key: *const libc::c_uchar,
1355        keylen: usize,
1356    ) -> libc::c_int;
1357}
1358extern "C" {
1359    pub fn crypto_generichash_blake2b_salt_personal(
1360        out: *mut libc::c_uchar,
1361        outlen: usize,
1362        in_: *const libc::c_uchar,
1363        inlen: libc::c_ulonglong,
1364        key: *const libc::c_uchar,
1365        keylen: usize,
1366        salt: *const libc::c_uchar,
1367        personal: *const libc::c_uchar,
1368    ) -> libc::c_int;
1369}
1370extern "C" {
1371    pub fn crypto_generichash_blake2b_init(
1372        state: *mut crypto_generichash_blake2b_state,
1373        key: *const libc::c_uchar,
1374        keylen: usize,
1375        outlen: usize,
1376    ) -> libc::c_int;
1377}
1378extern "C" {
1379    pub fn crypto_generichash_blake2b_init_salt_personal(
1380        state: *mut crypto_generichash_blake2b_state,
1381        key: *const libc::c_uchar,
1382        keylen: usize,
1383        outlen: usize,
1384        salt: *const libc::c_uchar,
1385        personal: *const libc::c_uchar,
1386    ) -> libc::c_int;
1387}
1388extern "C" {
1389    pub fn crypto_generichash_blake2b_update(
1390        state: *mut crypto_generichash_blake2b_state,
1391        in_: *const libc::c_uchar,
1392        inlen: libc::c_ulonglong,
1393    ) -> libc::c_int;
1394}
1395extern "C" {
1396    pub fn crypto_generichash_blake2b_final(
1397        state: *mut crypto_generichash_blake2b_state,
1398        out: *mut libc::c_uchar,
1399        outlen: usize,
1400    ) -> libc::c_int;
1401}
1402extern "C" {
1403    pub fn crypto_generichash_blake2b_keygen(k: *mut libc::c_uchar);
1404}
1405extern "C" {
1406    pub fn crypto_generichash_bytes_min() -> usize;
1407}
1408extern "C" {
1409    pub fn crypto_generichash_bytes_max() -> usize;
1410}
1411extern "C" {
1412    pub fn crypto_generichash_bytes() -> usize;
1413}
1414extern "C" {
1415    pub fn crypto_generichash_keybytes_min() -> usize;
1416}
1417extern "C" {
1418    pub fn crypto_generichash_keybytes_max() -> usize;
1419}
1420extern "C" {
1421    pub fn crypto_generichash_keybytes() -> usize;
1422}
1423extern "C" {
1424    pub fn crypto_generichash_primitive() -> *const libc::c_char;
1425}
1426pub type crypto_generichash_state = crypto_generichash_blake2b_state;
1427extern "C" {
1428    pub fn crypto_generichash_statebytes() -> usize;
1429}
1430extern "C" {
1431    pub fn crypto_generichash(
1432        out: *mut libc::c_uchar,
1433        outlen: usize,
1434        in_: *const libc::c_uchar,
1435        inlen: libc::c_ulonglong,
1436        key: *const libc::c_uchar,
1437        keylen: usize,
1438    ) -> libc::c_int;
1439}
1440extern "C" {
1441    pub fn crypto_generichash_init(
1442        state: *mut crypto_generichash_state,
1443        key: *const libc::c_uchar,
1444        keylen: usize,
1445        outlen: usize,
1446    ) -> libc::c_int;
1447}
1448extern "C" {
1449    pub fn crypto_generichash_update(
1450        state: *mut crypto_generichash_state,
1451        in_: *const libc::c_uchar,
1452        inlen: libc::c_ulonglong,
1453    ) -> libc::c_int;
1454}
1455extern "C" {
1456    pub fn crypto_generichash_final(
1457        state: *mut crypto_generichash_state,
1458        out: *mut libc::c_uchar,
1459        outlen: usize,
1460    ) -> libc::c_int;
1461}
1462extern "C" {
1463    pub fn crypto_generichash_keygen(k: *mut libc::c_uchar);
1464}
1465extern "C" {
1466    pub fn crypto_hash_bytes() -> usize;
1467}
1468extern "C" {
1469    pub fn crypto_hash(
1470        out: *mut libc::c_uchar,
1471        in_: *const libc::c_uchar,
1472        inlen: libc::c_ulonglong,
1473    ) -> libc::c_int;
1474}
1475extern "C" {
1476    pub fn crypto_hash_primitive() -> *const libc::c_char;
1477}
1478extern "C" {
1479    pub fn crypto_kdf_blake2b_bytes_min() -> usize;
1480}
1481extern "C" {
1482    pub fn crypto_kdf_blake2b_bytes_max() -> usize;
1483}
1484extern "C" {
1485    pub fn crypto_kdf_blake2b_contextbytes() -> usize;
1486}
1487extern "C" {
1488    pub fn crypto_kdf_blake2b_keybytes() -> usize;
1489}
1490extern "C" {
1491    pub fn crypto_kdf_blake2b_derive_from_key(
1492        subkey: *mut libc::c_uchar,
1493        subkey_len: usize,
1494        subkey_id: u64,
1495        ctx: *const libc::c_char,
1496        key: *const libc::c_uchar,
1497    ) -> libc::c_int;
1498}
1499extern "C" {
1500    pub fn crypto_kdf_bytes_min() -> usize;
1501}
1502extern "C" {
1503    pub fn crypto_kdf_bytes_max() -> usize;
1504}
1505extern "C" {
1506    pub fn crypto_kdf_contextbytes() -> usize;
1507}
1508extern "C" {
1509    pub fn crypto_kdf_keybytes() -> usize;
1510}
1511extern "C" {
1512    pub fn crypto_kdf_primitive() -> *const libc::c_char;
1513}
1514extern "C" {
1515    pub fn crypto_kdf_derive_from_key(
1516        subkey: *mut libc::c_uchar,
1517        subkey_len: usize,
1518        subkey_id: u64,
1519        ctx: *const libc::c_char,
1520        key: *const libc::c_uchar,
1521    ) -> libc::c_int;
1522}
1523extern "C" {
1524    pub fn crypto_kdf_keygen(k: *mut libc::c_uchar);
1525}
1526extern "C" {
1527    pub fn crypto_kx_publickeybytes() -> usize;
1528}
1529extern "C" {
1530    pub fn crypto_kx_secretkeybytes() -> usize;
1531}
1532extern "C" {
1533    pub fn crypto_kx_seedbytes() -> usize;
1534}
1535extern "C" {
1536    pub fn crypto_kx_sessionkeybytes() -> usize;
1537}
1538extern "C" {
1539    pub fn crypto_kx_primitive() -> *const libc::c_char;
1540}
1541extern "C" {
1542    pub fn crypto_kx_seed_keypair(
1543        pk: *mut libc::c_uchar,
1544        sk: *mut libc::c_uchar,
1545        seed: *const libc::c_uchar,
1546    ) -> libc::c_int;
1547}
1548extern "C" {
1549    pub fn crypto_kx_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int;
1550}
1551extern "C" {
1552    pub fn crypto_kx_client_session_keys(
1553        rx: *mut libc::c_uchar,
1554        tx: *mut libc::c_uchar,
1555        client_pk: *const libc::c_uchar,
1556        client_sk: *const libc::c_uchar,
1557        server_pk: *const libc::c_uchar,
1558    ) -> libc::c_int;
1559}
1560extern "C" {
1561    pub fn crypto_kx_server_session_keys(
1562        rx: *mut libc::c_uchar,
1563        tx: *mut libc::c_uchar,
1564        server_pk: *const libc::c_uchar,
1565        server_sk: *const libc::c_uchar,
1566        client_pk: *const libc::c_uchar,
1567    ) -> libc::c_int;
1568}
1569#[repr(C)]
1570#[repr(align(16))]
1571#[derive(Copy, Clone)]
1572pub struct crypto_onetimeauth_poly1305_state {
1573    pub opaque: [libc::c_uchar; 256usize],
1574}
1575extern "C" {
1576    pub fn crypto_onetimeauth_poly1305_statebytes() -> usize;
1577}
1578extern "C" {
1579    pub fn crypto_onetimeauth_poly1305_bytes() -> usize;
1580}
1581extern "C" {
1582    pub fn crypto_onetimeauth_poly1305_keybytes() -> usize;
1583}
1584extern "C" {
1585    pub fn crypto_onetimeauth_poly1305(
1586        out: *mut libc::c_uchar,
1587        in_: *const libc::c_uchar,
1588        inlen: libc::c_ulonglong,
1589        k: *const libc::c_uchar,
1590    ) -> libc::c_int;
1591}
1592extern "C" {
1593    pub fn crypto_onetimeauth_poly1305_verify(
1594        h: *const libc::c_uchar,
1595        in_: *const libc::c_uchar,
1596        inlen: libc::c_ulonglong,
1597        k: *const libc::c_uchar,
1598    ) -> libc::c_int;
1599}
1600extern "C" {
1601    pub fn crypto_onetimeauth_poly1305_init(
1602        state: *mut crypto_onetimeauth_poly1305_state,
1603        key: *const libc::c_uchar,
1604    ) -> libc::c_int;
1605}
1606extern "C" {
1607    pub fn crypto_onetimeauth_poly1305_update(
1608        state: *mut crypto_onetimeauth_poly1305_state,
1609        in_: *const libc::c_uchar,
1610        inlen: libc::c_ulonglong,
1611    ) -> libc::c_int;
1612}
1613extern "C" {
1614    pub fn crypto_onetimeauth_poly1305_final(
1615        state: *mut crypto_onetimeauth_poly1305_state,
1616        out: *mut libc::c_uchar,
1617    ) -> libc::c_int;
1618}
1619extern "C" {
1620    pub fn crypto_onetimeauth_poly1305_keygen(k: *mut libc::c_uchar);
1621}
1622pub type crypto_onetimeauth_state = crypto_onetimeauth_poly1305_state;
1623extern "C" {
1624    pub fn crypto_onetimeauth_statebytes() -> usize;
1625}
1626extern "C" {
1627    pub fn crypto_onetimeauth_bytes() -> usize;
1628}
1629extern "C" {
1630    pub fn crypto_onetimeauth_keybytes() -> usize;
1631}
1632extern "C" {
1633    pub fn crypto_onetimeauth_primitive() -> *const libc::c_char;
1634}
1635extern "C" {
1636    pub fn crypto_onetimeauth(
1637        out: *mut libc::c_uchar,
1638        in_: *const libc::c_uchar,
1639        inlen: libc::c_ulonglong,
1640        k: *const libc::c_uchar,
1641    ) -> libc::c_int;
1642}
1643extern "C" {
1644    pub fn crypto_onetimeauth_verify(
1645        h: *const libc::c_uchar,
1646        in_: *const libc::c_uchar,
1647        inlen: libc::c_ulonglong,
1648        k: *const libc::c_uchar,
1649    ) -> libc::c_int;
1650}
1651extern "C" {
1652    pub fn crypto_onetimeauth_init(
1653        state: *mut crypto_onetimeauth_state,
1654        key: *const libc::c_uchar,
1655    ) -> libc::c_int;
1656}
1657extern "C" {
1658    pub fn crypto_onetimeauth_update(
1659        state: *mut crypto_onetimeauth_state,
1660        in_: *const libc::c_uchar,
1661        inlen: libc::c_ulonglong,
1662    ) -> libc::c_int;
1663}
1664extern "C" {
1665    pub fn crypto_onetimeauth_final(
1666        state: *mut crypto_onetimeauth_state,
1667        out: *mut libc::c_uchar,
1668    ) -> libc::c_int;
1669}
1670extern "C" {
1671    pub fn crypto_onetimeauth_keygen(k: *mut libc::c_uchar);
1672}
1673extern "C" {
1674    pub fn crypto_pwhash_argon2i_alg_argon2i13() -> libc::c_int;
1675}
1676extern "C" {
1677    pub fn crypto_pwhash_argon2i_bytes_min() -> usize;
1678}
1679extern "C" {
1680    pub fn crypto_pwhash_argon2i_bytes_max() -> usize;
1681}
1682extern "C" {
1683    pub fn crypto_pwhash_argon2i_passwd_min() -> usize;
1684}
1685extern "C" {
1686    pub fn crypto_pwhash_argon2i_passwd_max() -> usize;
1687}
1688extern "C" {
1689    pub fn crypto_pwhash_argon2i_saltbytes() -> usize;
1690}
1691extern "C" {
1692    pub fn crypto_pwhash_argon2i_strbytes() -> usize;
1693}
1694extern "C" {
1695    pub fn crypto_pwhash_argon2i_strprefix() -> *const libc::c_char;
1696}
1697extern "C" {
1698    pub fn crypto_pwhash_argon2i_opslimit_min() -> usize;
1699}
1700extern "C" {
1701    pub fn crypto_pwhash_argon2i_opslimit_max() -> usize;
1702}
1703extern "C" {
1704    pub fn crypto_pwhash_argon2i_memlimit_min() -> usize;
1705}
1706extern "C" {
1707    pub fn crypto_pwhash_argon2i_memlimit_max() -> usize;
1708}
1709extern "C" {
1710    pub fn crypto_pwhash_argon2i_opslimit_interactive() -> usize;
1711}
1712extern "C" {
1713    pub fn crypto_pwhash_argon2i_memlimit_interactive() -> usize;
1714}
1715extern "C" {
1716    pub fn crypto_pwhash_argon2i_opslimit_moderate() -> usize;
1717}
1718extern "C" {
1719    pub fn crypto_pwhash_argon2i_memlimit_moderate() -> usize;
1720}
1721extern "C" {
1722    pub fn crypto_pwhash_argon2i_opslimit_sensitive() -> usize;
1723}
1724extern "C" {
1725    pub fn crypto_pwhash_argon2i_memlimit_sensitive() -> usize;
1726}
1727extern "C" {
1728    pub fn crypto_pwhash_argon2i(
1729        out: *mut libc::c_uchar,
1730        outlen: libc::c_ulonglong,
1731        passwd: *const libc::c_char,
1732        passwdlen: libc::c_ulonglong,
1733        salt: *const libc::c_uchar,
1734        opslimit: libc::c_ulonglong,
1735        memlimit: usize,
1736        alg: libc::c_int,
1737    ) -> libc::c_int;
1738}
1739extern "C" {
1740    pub fn crypto_pwhash_argon2i_str(
1741        out: *mut libc::c_char,
1742        passwd: *const libc::c_char,
1743        passwdlen: libc::c_ulonglong,
1744        opslimit: libc::c_ulonglong,
1745        memlimit: usize,
1746    ) -> libc::c_int;
1747}
1748extern "C" {
1749    pub fn crypto_pwhash_argon2i_str_verify(
1750        str: *const libc::c_char,
1751        passwd: *const libc::c_char,
1752        passwdlen: libc::c_ulonglong,
1753    ) -> libc::c_int;
1754}
1755extern "C" {
1756    pub fn crypto_pwhash_argon2i_str_needs_rehash(
1757        str: *const libc::c_char,
1758        opslimit: libc::c_ulonglong,
1759        memlimit: usize,
1760    ) -> libc::c_int;
1761}
1762extern "C" {
1763    pub fn crypto_pwhash_argon2id_alg_argon2id13() -> libc::c_int;
1764}
1765extern "C" {
1766    pub fn crypto_pwhash_argon2id_bytes_min() -> usize;
1767}
1768extern "C" {
1769    pub fn crypto_pwhash_argon2id_bytes_max() -> usize;
1770}
1771extern "C" {
1772    pub fn crypto_pwhash_argon2id_passwd_min() -> usize;
1773}
1774extern "C" {
1775    pub fn crypto_pwhash_argon2id_passwd_max() -> usize;
1776}
1777extern "C" {
1778    pub fn crypto_pwhash_argon2id_saltbytes() -> usize;
1779}
1780extern "C" {
1781    pub fn crypto_pwhash_argon2id_strbytes() -> usize;
1782}
1783extern "C" {
1784    pub fn crypto_pwhash_argon2id_strprefix() -> *const libc::c_char;
1785}
1786extern "C" {
1787    pub fn crypto_pwhash_argon2id_opslimit_min() -> usize;
1788}
1789extern "C" {
1790    pub fn crypto_pwhash_argon2id_opslimit_max() -> usize;
1791}
1792extern "C" {
1793    pub fn crypto_pwhash_argon2id_memlimit_min() -> usize;
1794}
1795extern "C" {
1796    pub fn crypto_pwhash_argon2id_memlimit_max() -> usize;
1797}
1798extern "C" {
1799    pub fn crypto_pwhash_argon2id_opslimit_interactive() -> usize;
1800}
1801extern "C" {
1802    pub fn crypto_pwhash_argon2id_memlimit_interactive() -> usize;
1803}
1804extern "C" {
1805    pub fn crypto_pwhash_argon2id_opslimit_moderate() -> usize;
1806}
1807extern "C" {
1808    pub fn crypto_pwhash_argon2id_memlimit_moderate() -> usize;
1809}
1810extern "C" {
1811    pub fn crypto_pwhash_argon2id_opslimit_sensitive() -> usize;
1812}
1813extern "C" {
1814    pub fn crypto_pwhash_argon2id_memlimit_sensitive() -> usize;
1815}
1816extern "C" {
1817    pub fn crypto_pwhash_argon2id(
1818        out: *mut libc::c_uchar,
1819        outlen: libc::c_ulonglong,
1820        passwd: *const libc::c_char,
1821        passwdlen: libc::c_ulonglong,
1822        salt: *const libc::c_uchar,
1823        opslimit: libc::c_ulonglong,
1824        memlimit: usize,
1825        alg: libc::c_int,
1826    ) -> libc::c_int;
1827}
1828extern "C" {
1829    pub fn crypto_pwhash_argon2id_str(
1830        out: *mut libc::c_char,
1831        passwd: *const libc::c_char,
1832        passwdlen: libc::c_ulonglong,
1833        opslimit: libc::c_ulonglong,
1834        memlimit: usize,
1835    ) -> libc::c_int;
1836}
1837extern "C" {
1838    pub fn crypto_pwhash_argon2id_str_verify(
1839        str: *const libc::c_char,
1840        passwd: *const libc::c_char,
1841        passwdlen: libc::c_ulonglong,
1842    ) -> libc::c_int;
1843}
1844extern "C" {
1845    pub fn crypto_pwhash_argon2id_str_needs_rehash(
1846        str: *const libc::c_char,
1847        opslimit: libc::c_ulonglong,
1848        memlimit: usize,
1849    ) -> libc::c_int;
1850}
1851extern "C" {
1852    pub fn crypto_pwhash_alg_argon2i13() -> libc::c_int;
1853}
1854extern "C" {
1855    pub fn crypto_pwhash_alg_argon2id13() -> libc::c_int;
1856}
1857extern "C" {
1858    pub fn crypto_pwhash_alg_default() -> libc::c_int;
1859}
1860extern "C" {
1861    pub fn crypto_pwhash_bytes_min() -> usize;
1862}
1863extern "C" {
1864    pub fn crypto_pwhash_bytes_max() -> usize;
1865}
1866extern "C" {
1867    pub fn crypto_pwhash_passwd_min() -> usize;
1868}
1869extern "C" {
1870    pub fn crypto_pwhash_passwd_max() -> usize;
1871}
1872extern "C" {
1873    pub fn crypto_pwhash_saltbytes() -> usize;
1874}
1875extern "C" {
1876    pub fn crypto_pwhash_strbytes() -> usize;
1877}
1878extern "C" {
1879    pub fn crypto_pwhash_strprefix() -> *const libc::c_char;
1880}
1881extern "C" {
1882    pub fn crypto_pwhash_opslimit_min() -> usize;
1883}
1884extern "C" {
1885    pub fn crypto_pwhash_opslimit_max() -> usize;
1886}
1887extern "C" {
1888    pub fn crypto_pwhash_memlimit_min() -> usize;
1889}
1890extern "C" {
1891    pub fn crypto_pwhash_memlimit_max() -> usize;
1892}
1893extern "C" {
1894    pub fn crypto_pwhash_opslimit_interactive() -> usize;
1895}
1896extern "C" {
1897    pub fn crypto_pwhash_memlimit_interactive() -> usize;
1898}
1899extern "C" {
1900    pub fn crypto_pwhash_opslimit_moderate() -> usize;
1901}
1902extern "C" {
1903    pub fn crypto_pwhash_memlimit_moderate() -> usize;
1904}
1905extern "C" {
1906    pub fn crypto_pwhash_opslimit_sensitive() -> usize;
1907}
1908extern "C" {
1909    pub fn crypto_pwhash_memlimit_sensitive() -> usize;
1910}
1911extern "C" {
1912    pub fn crypto_pwhash(
1913        out: *mut libc::c_uchar,
1914        outlen: libc::c_ulonglong,
1915        passwd: *const libc::c_char,
1916        passwdlen: libc::c_ulonglong,
1917        salt: *const libc::c_uchar,
1918        opslimit: libc::c_ulonglong,
1919        memlimit: usize,
1920        alg: libc::c_int,
1921    ) -> libc::c_int;
1922}
1923extern "C" {
1924    pub fn crypto_pwhash_str(
1925        out: *mut libc::c_char,
1926        passwd: *const libc::c_char,
1927        passwdlen: libc::c_ulonglong,
1928        opslimit: libc::c_ulonglong,
1929        memlimit: usize,
1930    ) -> libc::c_int;
1931}
1932extern "C" {
1933    pub fn crypto_pwhash_str_alg(
1934        out: *mut libc::c_char,
1935        passwd: *const libc::c_char,
1936        passwdlen: libc::c_ulonglong,
1937        opslimit: libc::c_ulonglong,
1938        memlimit: usize,
1939        alg: libc::c_int,
1940    ) -> libc::c_int;
1941}
1942extern "C" {
1943    pub fn crypto_pwhash_str_verify(
1944        str: *const libc::c_char,
1945        passwd: *const libc::c_char,
1946        passwdlen: libc::c_ulonglong,
1947    ) -> libc::c_int;
1948}
1949extern "C" {
1950    pub fn crypto_pwhash_str_needs_rehash(
1951        str: *const libc::c_char,
1952        opslimit: libc::c_ulonglong,
1953        memlimit: usize,
1954    ) -> libc::c_int;
1955}
1956extern "C" {
1957    pub fn crypto_pwhash_primitive() -> *const libc::c_char;
1958}
1959extern "C" {
1960    pub fn crypto_scalarmult_curve25519_bytes() -> usize;
1961}
1962extern "C" {
1963    pub fn crypto_scalarmult_curve25519_scalarbytes() -> usize;
1964}
1965extern "C" {
1966    pub fn crypto_scalarmult_curve25519(
1967        q: *mut libc::c_uchar,
1968        n: *const libc::c_uchar,
1969        p: *const libc::c_uchar,
1970    ) -> libc::c_int;
1971}
1972extern "C" {
1973    pub fn crypto_scalarmult_curve25519_base(
1974        q: *mut libc::c_uchar,
1975        n: *const libc::c_uchar,
1976    ) -> libc::c_int;
1977}
1978extern "C" {
1979    pub fn crypto_scalarmult_bytes() -> usize;
1980}
1981extern "C" {
1982    pub fn crypto_scalarmult_scalarbytes() -> usize;
1983}
1984extern "C" {
1985    pub fn crypto_scalarmult_primitive() -> *const libc::c_char;
1986}
1987extern "C" {
1988    pub fn crypto_scalarmult_base(q: *mut libc::c_uchar, n: *const libc::c_uchar) -> libc::c_int;
1989}
1990extern "C" {
1991    pub fn crypto_scalarmult(
1992        q: *mut libc::c_uchar,
1993        n: *const libc::c_uchar,
1994        p: *const libc::c_uchar,
1995    ) -> libc::c_int;
1996}
1997extern "C" {
1998    pub fn crypto_secretbox_xsalsa20poly1305_keybytes() -> usize;
1999}
2000extern "C" {
2001    pub fn crypto_secretbox_xsalsa20poly1305_noncebytes() -> usize;
2002}
2003extern "C" {
2004    pub fn crypto_secretbox_xsalsa20poly1305_macbytes() -> usize;
2005}
2006extern "C" {
2007    pub fn crypto_secretbox_xsalsa20poly1305_messagebytes_max() -> usize;
2008}
2009extern "C" {
2010    pub fn crypto_secretbox_xsalsa20poly1305(
2011        c: *mut libc::c_uchar,
2012        m: *const libc::c_uchar,
2013        mlen: libc::c_ulonglong,
2014        n: *const libc::c_uchar,
2015        k: *const libc::c_uchar,
2016    ) -> libc::c_int;
2017}
2018extern "C" {
2019    pub fn crypto_secretbox_xsalsa20poly1305_open(
2020        m: *mut libc::c_uchar,
2021        c: *const libc::c_uchar,
2022        clen: libc::c_ulonglong,
2023        n: *const libc::c_uchar,
2024        k: *const libc::c_uchar,
2025    ) -> libc::c_int;
2026}
2027extern "C" {
2028    pub fn crypto_secretbox_xsalsa20poly1305_keygen(k: *mut libc::c_uchar);
2029}
2030extern "C" {
2031    pub fn crypto_secretbox_xsalsa20poly1305_boxzerobytes() -> usize;
2032}
2033extern "C" {
2034    pub fn crypto_secretbox_xsalsa20poly1305_zerobytes() -> usize;
2035}
2036extern "C" {
2037    pub fn crypto_secretbox_keybytes() -> usize;
2038}
2039extern "C" {
2040    pub fn crypto_secretbox_noncebytes() -> usize;
2041}
2042extern "C" {
2043    pub fn crypto_secretbox_macbytes() -> usize;
2044}
2045extern "C" {
2046    pub fn crypto_secretbox_primitive() -> *const libc::c_char;
2047}
2048extern "C" {
2049    pub fn crypto_secretbox_messagebytes_max() -> usize;
2050}
2051extern "C" {
2052    pub fn crypto_secretbox_easy(
2053        c: *mut libc::c_uchar,
2054        m: *const libc::c_uchar,
2055        mlen: libc::c_ulonglong,
2056        n: *const libc::c_uchar,
2057        k: *const libc::c_uchar,
2058    ) -> libc::c_int;
2059}
2060extern "C" {
2061    pub fn crypto_secretbox_open_easy(
2062        m: *mut libc::c_uchar,
2063        c: *const libc::c_uchar,
2064        clen: libc::c_ulonglong,
2065        n: *const libc::c_uchar,
2066        k: *const libc::c_uchar,
2067    ) -> libc::c_int;
2068}
2069extern "C" {
2070    pub fn crypto_secretbox_detached(
2071        c: *mut libc::c_uchar,
2072        mac: *mut libc::c_uchar,
2073        m: *const libc::c_uchar,
2074        mlen: libc::c_ulonglong,
2075        n: *const libc::c_uchar,
2076        k: *const libc::c_uchar,
2077    ) -> libc::c_int;
2078}
2079extern "C" {
2080    pub fn crypto_secretbox_open_detached(
2081        m: *mut libc::c_uchar,
2082        c: *const libc::c_uchar,
2083        mac: *const libc::c_uchar,
2084        clen: libc::c_ulonglong,
2085        n: *const libc::c_uchar,
2086        k: *const libc::c_uchar,
2087    ) -> libc::c_int;
2088}
2089extern "C" {
2090    pub fn crypto_secretbox_keygen(k: *mut libc::c_uchar);
2091}
2092extern "C" {
2093    pub fn crypto_secretbox_zerobytes() -> usize;
2094}
2095extern "C" {
2096    pub fn crypto_secretbox_boxzerobytes() -> usize;
2097}
2098extern "C" {
2099    pub fn crypto_secretbox(
2100        c: *mut libc::c_uchar,
2101        m: *const libc::c_uchar,
2102        mlen: libc::c_ulonglong,
2103        n: *const libc::c_uchar,
2104        k: *const libc::c_uchar,
2105    ) -> libc::c_int;
2106}
2107extern "C" {
2108    pub fn crypto_secretbox_open(
2109        m: *mut libc::c_uchar,
2110        c: *const libc::c_uchar,
2111        clen: libc::c_ulonglong,
2112        n: *const libc::c_uchar,
2113        k: *const libc::c_uchar,
2114    ) -> libc::c_int;
2115}
2116extern "C" {
2117    pub fn crypto_stream_chacha20_keybytes() -> usize;
2118}
2119extern "C" {
2120    pub fn crypto_stream_chacha20_noncebytes() -> usize;
2121}
2122extern "C" {
2123    pub fn crypto_stream_chacha20_messagebytes_max() -> usize;
2124}
2125extern "C" {
2126    pub fn crypto_stream_chacha20(
2127        c: *mut libc::c_uchar,
2128        clen: libc::c_ulonglong,
2129        n: *const libc::c_uchar,
2130        k: *const libc::c_uchar,
2131    ) -> libc::c_int;
2132}
2133extern "C" {
2134    pub fn crypto_stream_chacha20_xor(
2135        c: *mut libc::c_uchar,
2136        m: *const libc::c_uchar,
2137        mlen: libc::c_ulonglong,
2138        n: *const libc::c_uchar,
2139        k: *const libc::c_uchar,
2140    ) -> libc::c_int;
2141}
2142extern "C" {
2143    pub fn crypto_stream_chacha20_xor_ic(
2144        c: *mut libc::c_uchar,
2145        m: *const libc::c_uchar,
2146        mlen: libc::c_ulonglong,
2147        n: *const libc::c_uchar,
2148        ic: u64,
2149        k: *const libc::c_uchar,
2150    ) -> libc::c_int;
2151}
2152extern "C" {
2153    pub fn crypto_stream_chacha20_keygen(k: *mut libc::c_uchar);
2154}
2155extern "C" {
2156    pub fn crypto_stream_chacha20_ietf_keybytes() -> usize;
2157}
2158extern "C" {
2159    pub fn crypto_stream_chacha20_ietf_noncebytes() -> usize;
2160}
2161extern "C" {
2162    pub fn crypto_stream_chacha20_ietf_messagebytes_max() -> usize;
2163}
2164extern "C" {
2165    pub fn crypto_stream_chacha20_ietf(
2166        c: *mut libc::c_uchar,
2167        clen: libc::c_ulonglong,
2168        n: *const libc::c_uchar,
2169        k: *const libc::c_uchar,
2170    ) -> libc::c_int;
2171}
2172extern "C" {
2173    pub fn crypto_stream_chacha20_ietf_xor(
2174        c: *mut libc::c_uchar,
2175        m: *const libc::c_uchar,
2176        mlen: libc::c_ulonglong,
2177        n: *const libc::c_uchar,
2178        k: *const libc::c_uchar,
2179    ) -> libc::c_int;
2180}
2181extern "C" {
2182    pub fn crypto_stream_chacha20_ietf_xor_ic(
2183        c: *mut libc::c_uchar,
2184        m: *const libc::c_uchar,
2185        mlen: libc::c_ulonglong,
2186        n: *const libc::c_uchar,
2187        ic: u32,
2188        k: *const libc::c_uchar,
2189    ) -> libc::c_int;
2190}
2191extern "C" {
2192    pub fn crypto_stream_chacha20_ietf_keygen(k: *mut libc::c_uchar);
2193}
2194extern "C" {
2195    pub fn crypto_secretstream_xchacha20poly1305_abytes() -> usize;
2196}
2197extern "C" {
2198    pub fn crypto_secretstream_xchacha20poly1305_headerbytes() -> usize;
2199}
2200extern "C" {
2201    pub fn crypto_secretstream_xchacha20poly1305_keybytes() -> usize;
2202}
2203extern "C" {
2204    pub fn crypto_secretstream_xchacha20poly1305_messagebytes_max() -> usize;
2205}
2206extern "C" {
2207    pub fn crypto_secretstream_xchacha20poly1305_tag_message() -> libc::c_uchar;
2208}
2209extern "C" {
2210    pub fn crypto_secretstream_xchacha20poly1305_tag_push() -> libc::c_uchar;
2211}
2212extern "C" {
2213    pub fn crypto_secretstream_xchacha20poly1305_tag_rekey() -> libc::c_uchar;
2214}
2215extern "C" {
2216    pub fn crypto_secretstream_xchacha20poly1305_tag_final() -> libc::c_uchar;
2217}
2218#[repr(C)]
2219#[derive(Debug, Copy, Clone)]
2220pub struct crypto_secretstream_xchacha20poly1305_state {
2221    pub k: [libc::c_uchar; 32usize],
2222    pub nonce: [libc::c_uchar; 12usize],
2223    pub _pad: [libc::c_uchar; 8usize],
2224}
2225extern "C" {
2226    pub fn crypto_secretstream_xchacha20poly1305_statebytes() -> usize;
2227}
2228extern "C" {
2229    pub fn crypto_secretstream_xchacha20poly1305_keygen(k: *mut libc::c_uchar);
2230}
2231extern "C" {
2232    pub fn crypto_secretstream_xchacha20poly1305_init_push(
2233        state: *mut crypto_secretstream_xchacha20poly1305_state,
2234        header: *mut libc::c_uchar,
2235        k: *const libc::c_uchar,
2236    ) -> libc::c_int;
2237}
2238extern "C" {
2239    pub fn crypto_secretstream_xchacha20poly1305_push(
2240        state: *mut crypto_secretstream_xchacha20poly1305_state,
2241        c: *mut libc::c_uchar,
2242        clen_p: *mut libc::c_ulonglong,
2243        m: *const libc::c_uchar,
2244        mlen: libc::c_ulonglong,
2245        ad: *const libc::c_uchar,
2246        adlen: libc::c_ulonglong,
2247        tag: libc::c_uchar,
2248    ) -> libc::c_int;
2249}
2250extern "C" {
2251    pub fn crypto_secretstream_xchacha20poly1305_init_pull(
2252        state: *mut crypto_secretstream_xchacha20poly1305_state,
2253        header: *const libc::c_uchar,
2254        k: *const libc::c_uchar,
2255    ) -> libc::c_int;
2256}
2257extern "C" {
2258    pub fn crypto_secretstream_xchacha20poly1305_pull(
2259        state: *mut crypto_secretstream_xchacha20poly1305_state,
2260        m: *mut libc::c_uchar,
2261        mlen_p: *mut libc::c_ulonglong,
2262        tag_p: *mut libc::c_uchar,
2263        c: *const libc::c_uchar,
2264        clen: libc::c_ulonglong,
2265        ad: *const libc::c_uchar,
2266        adlen: libc::c_ulonglong,
2267    ) -> libc::c_int;
2268}
2269extern "C" {
2270    pub fn crypto_secretstream_xchacha20poly1305_rekey(
2271        state: *mut crypto_secretstream_xchacha20poly1305_state,
2272    );
2273}
2274extern "C" {
2275    pub fn crypto_shorthash_siphash24_bytes() -> usize;
2276}
2277extern "C" {
2278    pub fn crypto_shorthash_siphash24_keybytes() -> usize;
2279}
2280extern "C" {
2281    pub fn crypto_shorthash_siphash24(
2282        out: *mut libc::c_uchar,
2283        in_: *const libc::c_uchar,
2284        inlen: libc::c_ulonglong,
2285        k: *const libc::c_uchar,
2286    ) -> libc::c_int;
2287}
2288extern "C" {
2289    pub fn crypto_shorthash_siphashx24_bytes() -> usize;
2290}
2291extern "C" {
2292    pub fn crypto_shorthash_siphashx24_keybytes() -> usize;
2293}
2294extern "C" {
2295    pub fn crypto_shorthash_siphashx24(
2296        out: *mut libc::c_uchar,
2297        in_: *const libc::c_uchar,
2298        inlen: libc::c_ulonglong,
2299        k: *const libc::c_uchar,
2300    ) -> libc::c_int;
2301}
2302extern "C" {
2303    pub fn crypto_shorthash_bytes() -> usize;
2304}
2305extern "C" {
2306    pub fn crypto_shorthash_keybytes() -> usize;
2307}
2308extern "C" {
2309    pub fn crypto_shorthash_primitive() -> *const libc::c_char;
2310}
2311extern "C" {
2312    pub fn crypto_shorthash(
2313        out: *mut libc::c_uchar,
2314        in_: *const libc::c_uchar,
2315        inlen: libc::c_ulonglong,
2316        k: *const libc::c_uchar,
2317    ) -> libc::c_int;
2318}
2319extern "C" {
2320    pub fn crypto_shorthash_keygen(k: *mut libc::c_uchar);
2321}
2322#[repr(C)]
2323#[derive(Copy, Clone)]
2324pub struct crypto_sign_ed25519ph_state {
2325    pub hs: crypto_hash_sha512_state,
2326}
2327extern "C" {
2328    pub fn crypto_sign_ed25519ph_statebytes() -> usize;
2329}
2330extern "C" {
2331    pub fn crypto_sign_ed25519_bytes() -> usize;
2332}
2333extern "C" {
2334    pub fn crypto_sign_ed25519_seedbytes() -> usize;
2335}
2336extern "C" {
2337    pub fn crypto_sign_ed25519_publickeybytes() -> usize;
2338}
2339extern "C" {
2340    pub fn crypto_sign_ed25519_secretkeybytes() -> usize;
2341}
2342extern "C" {
2343    pub fn crypto_sign_ed25519_messagebytes_max() -> usize;
2344}
2345extern "C" {
2346    pub fn crypto_sign_ed25519(
2347        sm: *mut libc::c_uchar,
2348        smlen_p: *mut libc::c_ulonglong,
2349        m: *const libc::c_uchar,
2350        mlen: libc::c_ulonglong,
2351        sk: *const libc::c_uchar,
2352    ) -> libc::c_int;
2353}
2354extern "C" {
2355    pub fn crypto_sign_ed25519_open(
2356        m: *mut libc::c_uchar,
2357        mlen_p: *mut libc::c_ulonglong,
2358        sm: *const libc::c_uchar,
2359        smlen: libc::c_ulonglong,
2360        pk: *const libc::c_uchar,
2361    ) -> libc::c_int;
2362}
2363extern "C" {
2364    pub fn crypto_sign_ed25519_detached(
2365        sig: *mut libc::c_uchar,
2366        siglen_p: *mut libc::c_ulonglong,
2367        m: *const libc::c_uchar,
2368        mlen: libc::c_ulonglong,
2369        sk: *const libc::c_uchar,
2370    ) -> libc::c_int;
2371}
2372extern "C" {
2373    pub fn crypto_sign_ed25519_verify_detached(
2374        sig: *const libc::c_uchar,
2375        m: *const libc::c_uchar,
2376        mlen: libc::c_ulonglong,
2377        pk: *const libc::c_uchar,
2378    ) -> libc::c_int;
2379}
2380extern "C" {
2381    pub fn crypto_sign_ed25519_keypair(
2382        pk: *mut libc::c_uchar,
2383        sk: *mut libc::c_uchar,
2384    ) -> libc::c_int;
2385}
2386extern "C" {
2387    pub fn crypto_sign_ed25519_seed_keypair(
2388        pk: *mut libc::c_uchar,
2389        sk: *mut libc::c_uchar,
2390        seed: *const libc::c_uchar,
2391    ) -> libc::c_int;
2392}
2393extern "C" {
2394    pub fn crypto_sign_ed25519_pk_to_curve25519(
2395        curve25519_pk: *mut libc::c_uchar,
2396        ed25519_pk: *const libc::c_uchar,
2397    ) -> libc::c_int;
2398}
2399extern "C" {
2400    pub fn crypto_sign_ed25519_sk_to_curve25519(
2401        curve25519_sk: *mut libc::c_uchar,
2402        ed25519_sk: *const libc::c_uchar,
2403    ) -> libc::c_int;
2404}
2405extern "C" {
2406    pub fn crypto_sign_ed25519_sk_to_seed(
2407        seed: *mut libc::c_uchar,
2408        sk: *const libc::c_uchar,
2409    ) -> libc::c_int;
2410}
2411extern "C" {
2412    pub fn crypto_sign_ed25519_sk_to_pk(
2413        pk: *mut libc::c_uchar,
2414        sk: *const libc::c_uchar,
2415    ) -> libc::c_int;
2416}
2417extern "C" {
2418    pub fn crypto_sign_ed25519ph_init(state: *mut crypto_sign_ed25519ph_state) -> libc::c_int;
2419}
2420extern "C" {
2421    pub fn crypto_sign_ed25519ph_update(
2422        state: *mut crypto_sign_ed25519ph_state,
2423        m: *const libc::c_uchar,
2424        mlen: libc::c_ulonglong,
2425    ) -> libc::c_int;
2426}
2427extern "C" {
2428    pub fn crypto_sign_ed25519ph_final_create(
2429        state: *mut crypto_sign_ed25519ph_state,
2430        sig: *mut libc::c_uchar,
2431        siglen_p: *mut libc::c_ulonglong,
2432        sk: *const libc::c_uchar,
2433    ) -> libc::c_int;
2434}
2435extern "C" {
2436    pub fn crypto_sign_ed25519ph_final_verify(
2437        state: *mut crypto_sign_ed25519ph_state,
2438        sig: *const libc::c_uchar,
2439        pk: *const libc::c_uchar,
2440    ) -> libc::c_int;
2441}
2442pub type crypto_sign_state = crypto_sign_ed25519ph_state;
2443extern "C" {
2444    pub fn crypto_sign_statebytes() -> usize;
2445}
2446extern "C" {
2447    pub fn crypto_sign_bytes() -> usize;
2448}
2449extern "C" {
2450    pub fn crypto_sign_seedbytes() -> usize;
2451}
2452extern "C" {
2453    pub fn crypto_sign_publickeybytes() -> usize;
2454}
2455extern "C" {
2456    pub fn crypto_sign_secretkeybytes() -> usize;
2457}
2458extern "C" {
2459    pub fn crypto_sign_messagebytes_max() -> usize;
2460}
2461extern "C" {
2462    pub fn crypto_sign_primitive() -> *const libc::c_char;
2463}
2464extern "C" {
2465    pub fn crypto_sign_seed_keypair(
2466        pk: *mut libc::c_uchar,
2467        sk: *mut libc::c_uchar,
2468        seed: *const libc::c_uchar,
2469    ) -> libc::c_int;
2470}
2471extern "C" {
2472    pub fn crypto_sign_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int;
2473}
2474extern "C" {
2475    pub fn crypto_sign(
2476        sm: *mut libc::c_uchar,
2477        smlen_p: *mut libc::c_ulonglong,
2478        m: *const libc::c_uchar,
2479        mlen: libc::c_ulonglong,
2480        sk: *const libc::c_uchar,
2481    ) -> libc::c_int;
2482}
2483extern "C" {
2484    pub fn crypto_sign_open(
2485        m: *mut libc::c_uchar,
2486        mlen_p: *mut libc::c_ulonglong,
2487        sm: *const libc::c_uchar,
2488        smlen: libc::c_ulonglong,
2489        pk: *const libc::c_uchar,
2490    ) -> libc::c_int;
2491}
2492extern "C" {
2493    pub fn crypto_sign_detached(
2494        sig: *mut libc::c_uchar,
2495        siglen_p: *mut libc::c_ulonglong,
2496        m: *const libc::c_uchar,
2497        mlen: libc::c_ulonglong,
2498        sk: *const libc::c_uchar,
2499    ) -> libc::c_int;
2500}
2501extern "C" {
2502    pub fn crypto_sign_verify_detached(
2503        sig: *const libc::c_uchar,
2504        m: *const libc::c_uchar,
2505        mlen: libc::c_ulonglong,
2506        pk: *const libc::c_uchar,
2507    ) -> libc::c_int;
2508}
2509extern "C" {
2510    pub fn crypto_sign_init(state: *mut crypto_sign_state) -> libc::c_int;
2511}
2512extern "C" {
2513    pub fn crypto_sign_update(
2514        state: *mut crypto_sign_state,
2515        m: *const libc::c_uchar,
2516        mlen: libc::c_ulonglong,
2517    ) -> libc::c_int;
2518}
2519extern "C" {
2520    pub fn crypto_sign_final_create(
2521        state: *mut crypto_sign_state,
2522        sig: *mut libc::c_uchar,
2523        siglen_p: *mut libc::c_ulonglong,
2524        sk: *const libc::c_uchar,
2525    ) -> libc::c_int;
2526}
2527extern "C" {
2528    pub fn crypto_sign_final_verify(
2529        state: *mut crypto_sign_state,
2530        sig: *const libc::c_uchar,
2531        pk: *const libc::c_uchar,
2532    ) -> libc::c_int;
2533}
2534extern "C" {
2535    pub fn crypto_stream_keybytes() -> usize;
2536}
2537extern "C" {
2538    pub fn crypto_stream_noncebytes() -> usize;
2539}
2540extern "C" {
2541    pub fn crypto_stream_messagebytes_max() -> usize;
2542}
2543extern "C" {
2544    pub fn crypto_stream_primitive() -> *const libc::c_char;
2545}
2546extern "C" {
2547    pub fn crypto_stream(
2548        c: *mut libc::c_uchar,
2549        clen: libc::c_ulonglong,
2550        n: *const libc::c_uchar,
2551        k: *const libc::c_uchar,
2552    ) -> libc::c_int;
2553}
2554extern "C" {
2555    pub fn crypto_stream_xor(
2556        c: *mut libc::c_uchar,
2557        m: *const libc::c_uchar,
2558        mlen: libc::c_ulonglong,
2559        n: *const libc::c_uchar,
2560        k: *const libc::c_uchar,
2561    ) -> libc::c_int;
2562}
2563extern "C" {
2564    pub fn crypto_stream_keygen(k: *mut libc::c_uchar);
2565}
2566extern "C" {
2567    pub fn crypto_stream_salsa20_keybytes() -> usize;
2568}
2569extern "C" {
2570    pub fn crypto_stream_salsa20_noncebytes() -> usize;
2571}
2572extern "C" {
2573    pub fn crypto_stream_salsa20_messagebytes_max() -> usize;
2574}
2575extern "C" {
2576    pub fn crypto_stream_salsa20(
2577        c: *mut libc::c_uchar,
2578        clen: libc::c_ulonglong,
2579        n: *const libc::c_uchar,
2580        k: *const libc::c_uchar,
2581    ) -> libc::c_int;
2582}
2583extern "C" {
2584    pub fn crypto_stream_salsa20_xor(
2585        c: *mut libc::c_uchar,
2586        m: *const libc::c_uchar,
2587        mlen: libc::c_ulonglong,
2588        n: *const libc::c_uchar,
2589        k: *const libc::c_uchar,
2590    ) -> libc::c_int;
2591}
2592extern "C" {
2593    pub fn crypto_stream_salsa20_xor_ic(
2594        c: *mut libc::c_uchar,
2595        m: *const libc::c_uchar,
2596        mlen: libc::c_ulonglong,
2597        n: *const libc::c_uchar,
2598        ic: u64,
2599        k: *const libc::c_uchar,
2600    ) -> libc::c_int;
2601}
2602extern "C" {
2603    pub fn crypto_stream_salsa20_keygen(k: *mut libc::c_uchar);
2604}
2605extern "C" {
2606    pub fn crypto_verify_16_bytes() -> usize;
2607}
2608extern "C" {
2609    pub fn crypto_verify_16(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int;
2610}
2611extern "C" {
2612    pub fn crypto_verify_32_bytes() -> usize;
2613}
2614extern "C" {
2615    pub fn crypto_verify_32(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int;
2616}
2617extern "C" {
2618    pub fn crypto_verify_64_bytes() -> usize;
2619}
2620extern "C" {
2621    pub fn crypto_verify_64(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int;
2622}
2623#[repr(C)]
2624#[derive(Debug, Copy, Clone)]
2625pub struct randombytes_implementation {
2626    pub implementation_name: ::core::option::Option<unsafe extern "C" fn() -> *const libc::c_char>,
2627    pub random: ::core::option::Option<unsafe extern "C" fn() -> u32>,
2628    pub stir: ::core::option::Option<unsafe extern "C" fn()>,
2629    pub uniform: ::core::option::Option<unsafe extern "C" fn(upper_bound: u32) -> u32>,
2630    pub buf: ::core::option::Option<unsafe extern "C" fn(buf: *mut libc::c_void, size: usize)>,
2631    pub close: ::core::option::Option<unsafe extern "C" fn() -> libc::c_int>,
2632}
2633extern "C" {
2634    pub fn randombytes_seedbytes() -> usize;
2635}
2636extern "C" {
2637    pub fn randombytes_buf(buf: *mut libc::c_void, size: usize);
2638}
2639extern "C" {
2640    pub fn randombytes_buf_deterministic(
2641        buf: *mut libc::c_void,
2642        size: usize,
2643        seed: *const libc::c_uchar,
2644    );
2645}
2646extern "C" {
2647    pub fn randombytes_random() -> u32;
2648}
2649extern "C" {
2650    pub fn randombytes_uniform(upper_bound: u32) -> u32;
2651}
2652extern "C" {
2653    pub fn randombytes_stir();
2654}
2655extern "C" {
2656    pub fn randombytes_close() -> libc::c_int;
2657}
2658extern "C" {
2659    pub fn randombytes_set_implementation(impl_: *mut randombytes_implementation) -> libc::c_int;
2660}
2661extern "C" {
2662    pub fn randombytes_implementation_name() -> *const libc::c_char;
2663}
2664extern "C" {
2665    pub static mut randombytes_internal_implementation: randombytes_implementation;
2666}
2667extern "C" {
2668    pub static mut randombytes_sysrandom_implementation: randombytes_implementation;
2669}
2670extern "C" {
2671    pub fn sodium_runtime_has_neon() -> libc::c_int;
2672}
2673extern "C" {
2674    pub fn sodium_runtime_has_sse2() -> libc::c_int;
2675}
2676extern "C" {
2677    pub fn sodium_runtime_has_sse3() -> libc::c_int;
2678}
2679extern "C" {
2680    pub fn sodium_runtime_has_ssse3() -> libc::c_int;
2681}
2682extern "C" {
2683    pub fn sodium_runtime_has_sse41() -> libc::c_int;
2684}
2685extern "C" {
2686    pub fn sodium_runtime_has_avx() -> libc::c_int;
2687}
2688extern "C" {
2689    pub fn sodium_runtime_has_avx2() -> libc::c_int;
2690}
2691extern "C" {
2692    pub fn sodium_runtime_has_avx512f() -> libc::c_int;
2693}
2694extern "C" {
2695    pub fn sodium_runtime_has_pclmul() -> libc::c_int;
2696}
2697extern "C" {
2698    pub fn sodium_runtime_has_aesni() -> libc::c_int;
2699}
2700extern "C" {
2701    pub fn sodium_runtime_has_rdrand() -> libc::c_int;
2702}
2703extern "C" {
2704    pub fn sodium_memzero(pnt: *mut libc::c_void, len: usize);
2705}
2706extern "C" {
2707    pub fn sodium_stackzero(len: usize);
2708}
2709extern "C" {
2710    pub fn sodium_memcmp(
2711        b1_: *const libc::c_void,
2712        b2_: *const libc::c_void,
2713        len: usize,
2714    ) -> libc::c_int;
2715}
2716extern "C" {
2717    pub fn sodium_compare(
2718        b1_: *const libc::c_uchar,
2719        b2_: *const libc::c_uchar,
2720        len: usize,
2721    ) -> libc::c_int;
2722}
2723extern "C" {
2724    pub fn sodium_is_zero(n: *const libc::c_uchar, nlen: usize) -> libc::c_int;
2725}
2726extern "C" {
2727    pub fn sodium_increment(n: *mut libc::c_uchar, nlen: usize);
2728}
2729extern "C" {
2730    pub fn sodium_add(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize);
2731}
2732extern "C" {
2733    pub fn sodium_sub(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize);
2734}
2735extern "C" {
2736    pub fn sodium_bin2hex(
2737        hex: *mut libc::c_char,
2738        hex_maxlen: usize,
2739        bin: *const libc::c_uchar,
2740        bin_len: usize,
2741    ) -> *mut libc::c_char;
2742}
2743extern "C" {
2744    pub fn sodium_hex2bin(
2745        bin: *mut libc::c_uchar,
2746        bin_maxlen: usize,
2747        hex: *const libc::c_char,
2748        hex_len: usize,
2749        ignore: *const libc::c_char,
2750        bin_len: *mut usize,
2751        hex_end: *mut *const libc::c_char,
2752    ) -> libc::c_int;
2753}
2754extern "C" {
2755    pub fn sodium_base64_encoded_len(bin_len: usize, variant: libc::c_int) -> usize;
2756}
2757extern "C" {
2758    pub fn sodium_bin2base64(
2759        b64: *mut libc::c_char,
2760        b64_maxlen: usize,
2761        bin: *const libc::c_uchar,
2762        bin_len: usize,
2763        variant: libc::c_int,
2764    ) -> *mut libc::c_char;
2765}
2766extern "C" {
2767    pub fn sodium_base642bin(
2768        bin: *mut libc::c_uchar,
2769        bin_maxlen: usize,
2770        b64: *const libc::c_char,
2771        b64_len: usize,
2772        ignore: *const libc::c_char,
2773        bin_len: *mut usize,
2774        b64_end: *mut *const libc::c_char,
2775        variant: libc::c_int,
2776    ) -> libc::c_int;
2777}
2778extern "C" {
2779    pub fn sodium_mlock(addr: *mut libc::c_void, len: usize) -> libc::c_int;
2780}
2781extern "C" {
2782    pub fn sodium_munlock(addr: *mut libc::c_void, len: usize) -> libc::c_int;
2783}
2784extern "C" {
2785    pub fn sodium_malloc(size: usize) -> *mut libc::c_void;
2786}
2787extern "C" {
2788    pub fn sodium_allocarray(count: usize, size: usize) -> *mut libc::c_void;
2789}
2790extern "C" {
2791    pub fn sodium_free(ptr: *mut libc::c_void);
2792}
2793extern "C" {
2794    pub fn sodium_mprotect_noaccess(ptr: *mut libc::c_void) -> libc::c_int;
2795}
2796extern "C" {
2797    pub fn sodium_mprotect_readonly(ptr: *mut libc::c_void) -> libc::c_int;
2798}
2799extern "C" {
2800    pub fn sodium_mprotect_readwrite(ptr: *mut libc::c_void) -> libc::c_int;
2801}
2802extern "C" {
2803    pub fn sodium_pad(
2804        padded_buflen_p: *mut usize,
2805        buf: *mut libc::c_uchar,
2806        unpadded_buflen: usize,
2807        blocksize: usize,
2808        max_buflen: usize,
2809    ) -> libc::c_int;
2810}
2811extern "C" {
2812    pub fn sodium_unpad(
2813        unpadded_buflen_p: *mut usize,
2814        buf: *const libc::c_uchar,
2815        padded_buflen: usize,
2816        blocksize: usize,
2817    ) -> libc::c_int;
2818}
2819extern "C" {
2820    pub fn crypto_stream_xchacha20_keybytes() -> usize;
2821}
2822extern "C" {
2823    pub fn crypto_stream_xchacha20_noncebytes() -> usize;
2824}
2825extern "C" {
2826    pub fn crypto_stream_xchacha20_messagebytes_max() -> usize;
2827}
2828extern "C" {
2829    pub fn crypto_stream_xchacha20(
2830        c: *mut libc::c_uchar,
2831        clen: libc::c_ulonglong,
2832        n: *const libc::c_uchar,
2833        k: *const libc::c_uchar,
2834    ) -> libc::c_int;
2835}
2836extern "C" {
2837    pub fn crypto_stream_xchacha20_xor(
2838        c: *mut libc::c_uchar,
2839        m: *const libc::c_uchar,
2840        mlen: libc::c_ulonglong,
2841        n: *const libc::c_uchar,
2842        k: *const libc::c_uchar,
2843    ) -> libc::c_int;
2844}
2845extern "C" {
2846    pub fn crypto_stream_xchacha20_xor_ic(
2847        c: *mut libc::c_uchar,
2848        m: *const libc::c_uchar,
2849        mlen: libc::c_ulonglong,
2850        n: *const libc::c_uchar,
2851        ic: u64,
2852        k: *const libc::c_uchar,
2853    ) -> libc::c_int;
2854}
2855extern "C" {
2856    pub fn crypto_stream_xchacha20_keygen(k: *mut libc::c_uchar);
2857}
2858extern "C" {
2859    pub fn crypto_box_curve25519xchacha20poly1305_seedbytes() -> usize;
2860}
2861extern "C" {
2862    pub fn crypto_box_curve25519xchacha20poly1305_publickeybytes() -> usize;
2863}
2864extern "C" {
2865    pub fn crypto_box_curve25519xchacha20poly1305_secretkeybytes() -> usize;
2866}
2867extern "C" {
2868    pub fn crypto_box_curve25519xchacha20poly1305_beforenmbytes() -> usize;
2869}
2870extern "C" {
2871    pub fn crypto_box_curve25519xchacha20poly1305_noncebytes() -> usize;
2872}
2873extern "C" {
2874    pub fn crypto_box_curve25519xchacha20poly1305_macbytes() -> usize;
2875}
2876extern "C" {
2877    pub fn crypto_box_curve25519xchacha20poly1305_messagebytes_max() -> usize;
2878}
2879extern "C" {
2880    pub fn crypto_box_curve25519xchacha20poly1305_seed_keypair(
2881        pk: *mut libc::c_uchar,
2882        sk: *mut libc::c_uchar,
2883        seed: *const libc::c_uchar,
2884    ) -> libc::c_int;
2885}
2886extern "C" {
2887    pub fn crypto_box_curve25519xchacha20poly1305_keypair(
2888        pk: *mut libc::c_uchar,
2889        sk: *mut libc::c_uchar,
2890    ) -> libc::c_int;
2891}
2892extern "C" {
2893    pub fn crypto_box_curve25519xchacha20poly1305_easy(
2894        c: *mut libc::c_uchar,
2895        m: *const libc::c_uchar,
2896        mlen: libc::c_ulonglong,
2897        n: *const libc::c_uchar,
2898        pk: *const libc::c_uchar,
2899        sk: *const libc::c_uchar,
2900    ) -> libc::c_int;
2901}
2902extern "C" {
2903    pub fn crypto_box_curve25519xchacha20poly1305_open_easy(
2904        m: *mut libc::c_uchar,
2905        c: *const libc::c_uchar,
2906        clen: libc::c_ulonglong,
2907        n: *const libc::c_uchar,
2908        pk: *const libc::c_uchar,
2909        sk: *const libc::c_uchar,
2910    ) -> libc::c_int;
2911}
2912extern "C" {
2913    pub fn crypto_box_curve25519xchacha20poly1305_detached(
2914        c: *mut libc::c_uchar,
2915        mac: *mut libc::c_uchar,
2916        m: *const libc::c_uchar,
2917        mlen: libc::c_ulonglong,
2918        n: *const libc::c_uchar,
2919        pk: *const libc::c_uchar,
2920        sk: *const libc::c_uchar,
2921    ) -> libc::c_int;
2922}
2923extern "C" {
2924    pub fn crypto_box_curve25519xchacha20poly1305_open_detached(
2925        m: *mut libc::c_uchar,
2926        c: *const libc::c_uchar,
2927        mac: *const libc::c_uchar,
2928        clen: libc::c_ulonglong,
2929        n: *const libc::c_uchar,
2930        pk: *const libc::c_uchar,
2931        sk: *const libc::c_uchar,
2932    ) -> libc::c_int;
2933}
2934extern "C" {
2935    pub fn crypto_box_curve25519xchacha20poly1305_beforenm(
2936        k: *mut libc::c_uchar,
2937        pk: *const libc::c_uchar,
2938        sk: *const libc::c_uchar,
2939    ) -> libc::c_int;
2940}
2941extern "C" {
2942    pub fn crypto_box_curve25519xchacha20poly1305_easy_afternm(
2943        c: *mut libc::c_uchar,
2944        m: *const libc::c_uchar,
2945        mlen: libc::c_ulonglong,
2946        n: *const libc::c_uchar,
2947        k: *const libc::c_uchar,
2948    ) -> libc::c_int;
2949}
2950extern "C" {
2951    pub fn crypto_box_curve25519xchacha20poly1305_open_easy_afternm(
2952        m: *mut libc::c_uchar,
2953        c: *const libc::c_uchar,
2954        clen: libc::c_ulonglong,
2955        n: *const libc::c_uchar,
2956        k: *const libc::c_uchar,
2957    ) -> libc::c_int;
2958}
2959extern "C" {
2960    pub fn crypto_box_curve25519xchacha20poly1305_detached_afternm(
2961        c: *mut libc::c_uchar,
2962        mac: *mut libc::c_uchar,
2963        m: *const libc::c_uchar,
2964        mlen: libc::c_ulonglong,
2965        n: *const libc::c_uchar,
2966        k: *const libc::c_uchar,
2967    ) -> libc::c_int;
2968}
2969extern "C" {
2970    pub fn crypto_box_curve25519xchacha20poly1305_open_detached_afternm(
2971        m: *mut libc::c_uchar,
2972        c: *const libc::c_uchar,
2973        mac: *const libc::c_uchar,
2974        clen: libc::c_ulonglong,
2975        n: *const libc::c_uchar,
2976        k: *const libc::c_uchar,
2977    ) -> libc::c_int;
2978}
2979extern "C" {
2980    pub fn crypto_box_curve25519xchacha20poly1305_sealbytes() -> usize;
2981}
2982extern "C" {
2983    pub fn crypto_box_curve25519xchacha20poly1305_seal(
2984        c: *mut libc::c_uchar,
2985        m: *const libc::c_uchar,
2986        mlen: libc::c_ulonglong,
2987        pk: *const libc::c_uchar,
2988    ) -> libc::c_int;
2989}
2990extern "C" {
2991    pub fn crypto_box_curve25519xchacha20poly1305_seal_open(
2992        m: *mut libc::c_uchar,
2993        c: *const libc::c_uchar,
2994        clen: libc::c_ulonglong,
2995        pk: *const libc::c_uchar,
2996        sk: *const libc::c_uchar,
2997    ) -> libc::c_int;
2998}
2999extern "C" {
3000    pub fn crypto_core_ed25519_bytes() -> usize;
3001}
3002extern "C" {
3003    pub fn crypto_core_ed25519_uniformbytes() -> usize;
3004}
3005extern "C" {
3006    pub fn crypto_core_ed25519_hashbytes() -> usize;
3007}
3008extern "C" {
3009    pub fn crypto_core_ed25519_scalarbytes() -> usize;
3010}
3011extern "C" {
3012    pub fn crypto_core_ed25519_nonreducedscalarbytes() -> usize;
3013}
3014extern "C" {
3015    pub fn crypto_core_ed25519_is_valid_point(p: *const libc::c_uchar) -> libc::c_int;
3016}
3017extern "C" {
3018    pub fn crypto_core_ed25519_add(
3019        r: *mut libc::c_uchar,
3020        p: *const libc::c_uchar,
3021        q: *const libc::c_uchar,
3022    ) -> libc::c_int;
3023}
3024extern "C" {
3025    pub fn crypto_core_ed25519_sub(
3026        r: *mut libc::c_uchar,
3027        p: *const libc::c_uchar,
3028        q: *const libc::c_uchar,
3029    ) -> libc::c_int;
3030}
3031extern "C" {
3032    pub fn crypto_core_ed25519_from_uniform(
3033        p: *mut libc::c_uchar,
3034        r: *const libc::c_uchar,
3035    ) -> libc::c_int;
3036}
3037extern "C" {
3038    pub fn crypto_core_ed25519_from_hash(
3039        p: *mut libc::c_uchar,
3040        h: *const libc::c_uchar,
3041    ) -> libc::c_int;
3042}
3043extern "C" {
3044    pub fn crypto_core_ed25519_random(p: *mut libc::c_uchar);
3045}
3046extern "C" {
3047    pub fn crypto_core_ed25519_scalar_random(r: *mut libc::c_uchar);
3048}
3049extern "C" {
3050    pub fn crypto_core_ed25519_scalar_invert(
3051        recip: *mut libc::c_uchar,
3052        s: *const libc::c_uchar,
3053    ) -> libc::c_int;
3054}
3055extern "C" {
3056    pub fn crypto_core_ed25519_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar);
3057}
3058extern "C" {
3059    pub fn crypto_core_ed25519_scalar_complement(comp: *mut libc::c_uchar, s: *const libc::c_uchar);
3060}
3061extern "C" {
3062    pub fn crypto_core_ed25519_scalar_add(
3063        z: *mut libc::c_uchar,
3064        x: *const libc::c_uchar,
3065        y: *const libc::c_uchar,
3066    );
3067}
3068extern "C" {
3069    pub fn crypto_core_ed25519_scalar_sub(
3070        z: *mut libc::c_uchar,
3071        x: *const libc::c_uchar,
3072        y: *const libc::c_uchar,
3073    );
3074}
3075extern "C" {
3076    pub fn crypto_core_ed25519_scalar_mul(
3077        z: *mut libc::c_uchar,
3078        x: *const libc::c_uchar,
3079        y: *const libc::c_uchar,
3080    );
3081}
3082extern "C" {
3083    pub fn crypto_core_ed25519_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar);
3084}
3085extern "C" {
3086    pub fn crypto_core_ristretto255_bytes() -> usize;
3087}
3088extern "C" {
3089    pub fn crypto_core_ristretto255_hashbytes() -> usize;
3090}
3091extern "C" {
3092    pub fn crypto_core_ristretto255_scalarbytes() -> usize;
3093}
3094extern "C" {
3095    pub fn crypto_core_ristretto255_nonreducedscalarbytes() -> usize;
3096}
3097extern "C" {
3098    pub fn crypto_core_ristretto255_is_valid_point(p: *const libc::c_uchar) -> libc::c_int;
3099}
3100extern "C" {
3101    pub fn crypto_core_ristretto255_add(
3102        r: *mut libc::c_uchar,
3103        p: *const libc::c_uchar,
3104        q: *const libc::c_uchar,
3105    ) -> libc::c_int;
3106}
3107extern "C" {
3108    pub fn crypto_core_ristretto255_sub(
3109        r: *mut libc::c_uchar,
3110        p: *const libc::c_uchar,
3111        q: *const libc::c_uchar,
3112    ) -> libc::c_int;
3113}
3114extern "C" {
3115    pub fn crypto_core_ristretto255_from_hash(
3116        p: *mut libc::c_uchar,
3117        r: *const libc::c_uchar,
3118    ) -> libc::c_int;
3119}
3120extern "C" {
3121    pub fn crypto_core_ristretto255_random(p: *mut libc::c_uchar);
3122}
3123extern "C" {
3124    pub fn crypto_core_ristretto255_scalar_random(r: *mut libc::c_uchar);
3125}
3126extern "C" {
3127    pub fn crypto_core_ristretto255_scalar_invert(
3128        recip: *mut libc::c_uchar,
3129        s: *const libc::c_uchar,
3130    ) -> libc::c_int;
3131}
3132extern "C" {
3133    pub fn crypto_core_ristretto255_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar);
3134}
3135extern "C" {
3136    pub fn crypto_core_ristretto255_scalar_complement(
3137        comp: *mut libc::c_uchar,
3138        s: *const libc::c_uchar,
3139    );
3140}
3141extern "C" {
3142    pub fn crypto_core_ristretto255_scalar_add(
3143        z: *mut libc::c_uchar,
3144        x: *const libc::c_uchar,
3145        y: *const libc::c_uchar,
3146    );
3147}
3148extern "C" {
3149    pub fn crypto_core_ristretto255_scalar_sub(
3150        z: *mut libc::c_uchar,
3151        x: *const libc::c_uchar,
3152        y: *const libc::c_uchar,
3153    );
3154}
3155extern "C" {
3156    pub fn crypto_core_ristretto255_scalar_mul(
3157        z: *mut libc::c_uchar,
3158        x: *const libc::c_uchar,
3159        y: *const libc::c_uchar,
3160    );
3161}
3162extern "C" {
3163    pub fn crypto_core_ristretto255_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar);
3164}
3165extern "C" {
3166    pub fn crypto_scalarmult_ed25519_bytes() -> usize;
3167}
3168extern "C" {
3169    pub fn crypto_scalarmult_ed25519_scalarbytes() -> usize;
3170}
3171extern "C" {
3172    pub fn crypto_scalarmult_ed25519(
3173        q: *mut libc::c_uchar,
3174        n: *const libc::c_uchar,
3175        p: *const libc::c_uchar,
3176    ) -> libc::c_int;
3177}
3178extern "C" {
3179    pub fn crypto_scalarmult_ed25519_noclamp(
3180        q: *mut libc::c_uchar,
3181        n: *const libc::c_uchar,
3182        p: *const libc::c_uchar,
3183    ) -> libc::c_int;
3184}
3185extern "C" {
3186    pub fn crypto_scalarmult_ed25519_base(
3187        q: *mut libc::c_uchar,
3188        n: *const libc::c_uchar,
3189    ) -> libc::c_int;
3190}
3191extern "C" {
3192    pub fn crypto_scalarmult_ed25519_base_noclamp(
3193        q: *mut libc::c_uchar,
3194        n: *const libc::c_uchar,
3195    ) -> libc::c_int;
3196}
3197extern "C" {
3198    pub fn crypto_scalarmult_ristretto255_bytes() -> usize;
3199}
3200extern "C" {
3201    pub fn crypto_scalarmult_ristretto255_scalarbytes() -> usize;
3202}
3203extern "C" {
3204    pub fn crypto_scalarmult_ristretto255(
3205        q: *mut libc::c_uchar,
3206        n: *const libc::c_uchar,
3207        p: *const libc::c_uchar,
3208    ) -> libc::c_int;
3209}
3210extern "C" {
3211    pub fn crypto_scalarmult_ristretto255_base(
3212        q: *mut libc::c_uchar,
3213        n: *const libc::c_uchar,
3214    ) -> libc::c_int;
3215}
3216extern "C" {
3217    pub fn crypto_secretbox_xchacha20poly1305_keybytes() -> usize;
3218}
3219extern "C" {
3220    pub fn crypto_secretbox_xchacha20poly1305_noncebytes() -> usize;
3221}
3222extern "C" {
3223    pub fn crypto_secretbox_xchacha20poly1305_macbytes() -> usize;
3224}
3225extern "C" {
3226    pub fn crypto_secretbox_xchacha20poly1305_messagebytes_max() -> usize;
3227}
3228extern "C" {
3229    pub fn crypto_secretbox_xchacha20poly1305_easy(
3230        c: *mut libc::c_uchar,
3231        m: *const libc::c_uchar,
3232        mlen: libc::c_ulonglong,
3233        n: *const libc::c_uchar,
3234        k: *const libc::c_uchar,
3235    ) -> libc::c_int;
3236}
3237extern "C" {
3238    pub fn crypto_secretbox_xchacha20poly1305_open_easy(
3239        m: *mut libc::c_uchar,
3240        c: *const libc::c_uchar,
3241        clen: libc::c_ulonglong,
3242        n: *const libc::c_uchar,
3243        k: *const libc::c_uchar,
3244    ) -> libc::c_int;
3245}
3246extern "C" {
3247    pub fn crypto_secretbox_xchacha20poly1305_detached(
3248        c: *mut libc::c_uchar,
3249        mac: *mut libc::c_uchar,
3250        m: *const libc::c_uchar,
3251        mlen: libc::c_ulonglong,
3252        n: *const libc::c_uchar,
3253        k: *const libc::c_uchar,
3254    ) -> libc::c_int;
3255}
3256extern "C" {
3257    pub fn crypto_secretbox_xchacha20poly1305_open_detached(
3258        m: *mut libc::c_uchar,
3259        c: *const libc::c_uchar,
3260        mac: *const libc::c_uchar,
3261        clen: libc::c_ulonglong,
3262        n: *const libc::c_uchar,
3263        k: *const libc::c_uchar,
3264    ) -> libc::c_int;
3265}
3266extern "C" {
3267    pub fn crypto_pwhash_scryptsalsa208sha256_bytes_min() -> usize;
3268}
3269extern "C" {
3270    pub fn crypto_pwhash_scryptsalsa208sha256_bytes_max() -> usize;
3271}
3272extern "C" {
3273    pub fn crypto_pwhash_scryptsalsa208sha256_passwd_min() -> usize;
3274}
3275extern "C" {
3276    pub fn crypto_pwhash_scryptsalsa208sha256_passwd_max() -> usize;
3277}
3278extern "C" {
3279    pub fn crypto_pwhash_scryptsalsa208sha256_saltbytes() -> usize;
3280}
3281extern "C" {
3282    pub fn crypto_pwhash_scryptsalsa208sha256_strbytes() -> usize;
3283}
3284extern "C" {
3285    pub fn crypto_pwhash_scryptsalsa208sha256_strprefix() -> *const libc::c_char;
3286}
3287extern "C" {
3288    pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_min() -> usize;
3289}
3290extern "C" {
3291    pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_max() -> usize;
3292}
3293extern "C" {
3294    pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_min() -> usize;
3295}
3296extern "C" {
3297    pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_max() -> usize;
3298}
3299extern "C" {
3300    pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_interactive() -> usize;
3301}
3302extern "C" {
3303    pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_interactive() -> usize;
3304}
3305extern "C" {
3306    pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive() -> usize;
3307}
3308extern "C" {
3309    pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive() -> usize;
3310}
3311extern "C" {
3312    pub fn crypto_pwhash_scryptsalsa208sha256(
3313        out: *mut libc::c_uchar,
3314        outlen: libc::c_ulonglong,
3315        passwd: *const libc::c_char,
3316        passwdlen: libc::c_ulonglong,
3317        salt: *const libc::c_uchar,
3318        opslimit: libc::c_ulonglong,
3319        memlimit: usize,
3320    ) -> libc::c_int;
3321}
3322extern "C" {
3323    pub fn crypto_pwhash_scryptsalsa208sha256_str(
3324        out: *mut libc::c_char,
3325        passwd: *const libc::c_char,
3326        passwdlen: libc::c_ulonglong,
3327        opslimit: libc::c_ulonglong,
3328        memlimit: usize,
3329    ) -> libc::c_int;
3330}
3331extern "C" {
3332    pub fn crypto_pwhash_scryptsalsa208sha256_str_verify(
3333        str: *const libc::c_char,
3334        passwd: *const libc::c_char,
3335        passwdlen: libc::c_ulonglong,
3336    ) -> libc::c_int;
3337}
3338extern "C" {
3339    pub fn crypto_pwhash_scryptsalsa208sha256_ll(
3340        passwd: *const u8,
3341        passwdlen: usize,
3342        salt: *const u8,
3343        saltlen: usize,
3344        N: u64,
3345        r: u32,
3346        p: u32,
3347        buf: *mut u8,
3348        buflen: usize,
3349    ) -> libc::c_int;
3350}
3351extern "C" {
3352    pub fn crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(
3353        str: *const libc::c_char,
3354        opslimit: libc::c_ulonglong,
3355        memlimit: usize,
3356    ) -> libc::c_int;
3357}
3358extern "C" {
3359    pub fn crypto_stream_salsa2012_keybytes() -> usize;
3360}
3361extern "C" {
3362    pub fn crypto_stream_salsa2012_noncebytes() -> usize;
3363}
3364extern "C" {
3365    pub fn crypto_stream_salsa2012_messagebytes_max() -> usize;
3366}
3367extern "C" {
3368    pub fn crypto_stream_salsa2012(
3369        c: *mut libc::c_uchar,
3370        clen: libc::c_ulonglong,
3371        n: *const libc::c_uchar,
3372        k: *const libc::c_uchar,
3373    ) -> libc::c_int;
3374}
3375extern "C" {
3376    pub fn crypto_stream_salsa2012_xor(
3377        c: *mut libc::c_uchar,
3378        m: *const libc::c_uchar,
3379        mlen: libc::c_ulonglong,
3380        n: *const libc::c_uchar,
3381        k: *const libc::c_uchar,
3382    ) -> libc::c_int;
3383}
3384extern "C" {
3385    pub fn crypto_stream_salsa2012_keygen(k: *mut libc::c_uchar);
3386}
3387extern "C" {
3388    pub fn crypto_stream_salsa208_keybytes() -> usize;
3389}
3390extern "C" {
3391    pub fn crypto_stream_salsa208_noncebytes() -> usize;
3392}
3393extern "C" {
3394    pub fn crypto_stream_salsa208_messagebytes_max() -> usize;
3395}
3396extern "C" {
3397    pub fn crypto_stream_salsa208(
3398        c: *mut libc::c_uchar,
3399        clen: libc::c_ulonglong,
3400        n: *const libc::c_uchar,
3401        k: *const libc::c_uchar,
3402    ) -> libc::c_int;
3403}
3404extern "C" {
3405    pub fn crypto_stream_salsa208_xor(
3406        c: *mut libc::c_uchar,
3407        m: *const libc::c_uchar,
3408        mlen: libc::c_ulonglong,
3409        n: *const libc::c_uchar,
3410        k: *const libc::c_uchar,
3411    ) -> libc::c_int;
3412}
3413extern "C" {
3414    pub fn crypto_stream_salsa208_keygen(k: *mut libc::c_uchar);
3415}