1 /* automatically generated by rust-bindgen 0.59.1 */
2
3 pub const SODIUM_VERSION_STRING: &'static [u8; 7usize] = b"1.0.18\0";
4 pub const SODIUM_LIBRARY_VERSION_MAJOR: u32 = 10;
5 pub const SODIUM_LIBRARY_VERSION_MINOR: u32 = 3;
6 pub const crypto_aead_aes256gcm_KEYBYTES: u32 = 32;
7 pub const crypto_aead_aes256gcm_NSECBYTES: u32 = 0;
8 pub const crypto_aead_aes256gcm_NPUBBYTES: u32 = 12;
9 pub const crypto_aead_aes256gcm_ABYTES: u32 = 16;
10 pub const crypto_aead_chacha20poly1305_ietf_KEYBYTES: u32 = 32;
11 pub const crypto_aead_chacha20poly1305_ietf_NSECBYTES: u32 = 0;
12 pub const crypto_aead_chacha20poly1305_ietf_NPUBBYTES: u32 = 12;
13 pub const crypto_aead_chacha20poly1305_ietf_ABYTES: u32 = 16;
14 pub const crypto_aead_chacha20poly1305_KEYBYTES: u32 = 32;
15 pub const crypto_aead_chacha20poly1305_NSECBYTES: u32 = 0;
16 pub const crypto_aead_chacha20poly1305_NPUBBYTES: u32 = 8;
17 pub const crypto_aead_chacha20poly1305_ABYTES: u32 = 16;
18 pub const crypto_aead_chacha20poly1305_IETF_KEYBYTES: u32 = 32;
19 pub const crypto_aead_chacha20poly1305_IETF_NSECBYTES: u32 = 0;
20 pub const crypto_aead_chacha20poly1305_IETF_NPUBBYTES: u32 = 12;
21 pub const crypto_aead_chacha20poly1305_IETF_ABYTES: u32 = 16;
22 pub const crypto_aead_xchacha20poly1305_ietf_KEYBYTES: u32 = 32;
23 pub const crypto_aead_xchacha20poly1305_ietf_NSECBYTES: u32 = 0;
24 pub const crypto_aead_xchacha20poly1305_ietf_NPUBBYTES: u32 = 24;
25 pub const crypto_aead_xchacha20poly1305_ietf_ABYTES: u32 = 16;
26 pub const crypto_aead_xchacha20poly1305_IETF_KEYBYTES: u32 = 32;
27 pub const crypto_aead_xchacha20poly1305_IETF_NSECBYTES: u32 = 0;
28 pub const crypto_aead_xchacha20poly1305_IETF_NPUBBYTES: u32 = 24;
29 pub const crypto_aead_xchacha20poly1305_IETF_ABYTES: u32 = 16;
30 pub const crypto_hash_sha512_BYTES: u32 = 64;
31 pub const crypto_auth_hmacsha512_BYTES: u32 = 64;
32 pub const crypto_auth_hmacsha512_KEYBYTES: u32 = 32;
33 pub const crypto_auth_hmacsha512256_BYTES: u32 = 32;
34 pub const crypto_auth_hmacsha512256_KEYBYTES: u32 = 32;
35 pub const crypto_auth_BYTES: u32 = 32;
36 pub const crypto_auth_KEYBYTES: u32 = 32;
37 pub const crypto_auth_PRIMITIVE: &'static [u8; 14usize] = b"hmacsha512256\0";
38 pub const crypto_hash_sha256_BYTES: u32 = 32;
39 pub const crypto_auth_hmacsha256_BYTES: u32 = 32;
40 pub const crypto_auth_hmacsha256_KEYBYTES: u32 = 32;
41 pub const crypto_stream_xsalsa20_KEYBYTES: u32 = 32;
42 pub const crypto_stream_xsalsa20_NONCEBYTES: u32 = 24;
43 pub const crypto_box_curve25519xsalsa20poly1305_SEEDBYTES: u32 = 32;
44 pub const crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES: u32 = 32;
45 pub const crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES: u32 = 32;
46 pub const crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES: u32 = 32;
47 pub const crypto_box_curve25519xsalsa20poly1305_NONCEBYTES: u32 = 24;
48 pub const crypto_box_curve25519xsalsa20poly1305_MACBYTES: u32 = 16;
49 pub const crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES: u32 = 16;
50 pub const crypto_box_curve25519xsalsa20poly1305_ZEROBYTES: u32 = 32;
51 pub const crypto_box_SEEDBYTES: u32 = 32;
52 pub const crypto_box_PUBLICKEYBYTES: u32 = 32;
53 pub const crypto_box_SECRETKEYBYTES: u32 = 32;
54 pub const crypto_box_NONCEBYTES: u32 = 24;
55 pub const crypto_box_MACBYTES: u32 = 16;
56 pub const crypto_box_PRIMITIVE: &'static [u8; 27usize] = b"curve25519xsalsa20poly1305\0";
57 pub const crypto_box_BEFORENMBYTES: u32 = 32;
58 pub const crypto_box_SEALBYTES: u32 = 48;
59 pub const crypto_box_ZEROBYTES: u32 = 32;
60 pub const crypto_box_BOXZEROBYTES: u32 = 16;
61 pub const crypto_core_hsalsa20_OUTPUTBYTES: u32 = 32;
62 pub const crypto_core_hsalsa20_INPUTBYTES: u32 = 16;
63 pub const crypto_core_hsalsa20_KEYBYTES: u32 = 32;
64 pub const crypto_core_hsalsa20_CONSTBYTES: u32 = 16;
65 pub const crypto_core_hchacha20_OUTPUTBYTES: u32 = 32;
66 pub const crypto_core_hchacha20_INPUTBYTES: u32 = 16;
67 pub const crypto_core_hchacha20_KEYBYTES: u32 = 32;
68 pub const crypto_core_hchacha20_CONSTBYTES: u32 = 16;
69 pub const crypto_core_salsa20_OUTPUTBYTES: u32 = 64;
70 pub const crypto_core_salsa20_INPUTBYTES: u32 = 16;
71 pub const crypto_core_salsa20_KEYBYTES: u32 = 32;
72 pub const crypto_core_salsa20_CONSTBYTES: u32 = 16;
73 pub const crypto_core_salsa2012_OUTPUTBYTES: u32 = 64;
74 pub const crypto_core_salsa2012_INPUTBYTES: u32 = 16;
75 pub const crypto_core_salsa2012_KEYBYTES: u32 = 32;
76 pub const crypto_core_salsa2012_CONSTBYTES: u32 = 16;
77 pub const crypto_core_salsa208_OUTPUTBYTES: u32 = 64;
78 pub const crypto_core_salsa208_INPUTBYTES: u32 = 16;
79 pub const crypto_core_salsa208_KEYBYTES: u32 = 32;
80 pub const crypto_core_salsa208_CONSTBYTES: u32 = 16;
81 pub const crypto_generichash_blake2b_BYTES_MIN: u32 = 16;
82 pub const crypto_generichash_blake2b_BYTES_MAX: u32 = 64;
83 pub const crypto_generichash_blake2b_BYTES: u32 = 32;
84 pub const crypto_generichash_blake2b_KEYBYTES_MIN: u32 = 16;
85 pub const crypto_generichash_blake2b_KEYBYTES_MAX: u32 = 64;
86 pub const crypto_generichash_blake2b_KEYBYTES: u32 = 32;
87 pub const crypto_generichash_blake2b_SALTBYTES: u32 = 16;
88 pub const crypto_generichash_blake2b_PERSONALBYTES: u32 = 16;
89 pub const crypto_generichash_BYTES_MIN: u32 = 16;
90 pub const crypto_generichash_BYTES_MAX: u32 = 64;
91 pub const crypto_generichash_BYTES: u32 = 32;
92 pub const crypto_generichash_KEYBYTES_MIN: u32 = 16;
93 pub const crypto_generichash_KEYBYTES_MAX: u32 = 64;
94 pub const crypto_generichash_KEYBYTES: u32 = 32;
95 pub const crypto_generichash_PRIMITIVE: &'static [u8; 8usize] = b"blake2b\0";
96 pub const crypto_hash_BYTES: u32 = 64;
97 pub const crypto_hash_PRIMITIVE: &'static [u8; 7usize] = b"sha512\0";
98 pub const crypto_kdf_blake2b_BYTES_MIN: u32 = 16;
99 pub const crypto_kdf_blake2b_BYTES_MAX: u32 = 64;
100 pub const crypto_kdf_blake2b_CONTEXTBYTES: u32 = 8;
101 pub const crypto_kdf_blake2b_KEYBYTES: u32 = 32;
102 pub const crypto_kdf_BYTES_MIN: u32 = 16;
103 pub const crypto_kdf_BYTES_MAX: u32 = 64;
104 pub const crypto_kdf_CONTEXTBYTES: u32 = 8;
105 pub const crypto_kdf_KEYBYTES: u32 = 32;
106 pub const crypto_kdf_PRIMITIVE: &'static [u8; 8usize] = b"blake2b\0";
107 pub const crypto_kx_PUBLICKEYBYTES: u32 = 32;
108 pub const crypto_kx_SECRETKEYBYTES: u32 = 32;
109 pub const crypto_kx_SEEDBYTES: u32 = 32;
110 pub const crypto_kx_SESSIONKEYBYTES: u32 = 32;
111 pub const crypto_kx_PRIMITIVE: &'static [u8; 14usize] = b"x25519blake2b\0";
112 pub const crypto_onetimeauth_poly1305_BYTES: u32 = 16;
113 pub const crypto_onetimeauth_poly1305_KEYBYTES: u32 = 32;
114 pub const crypto_onetimeauth_BYTES: u32 = 16;
115 pub const crypto_onetimeauth_KEYBYTES: u32 = 32;
116 pub const crypto_onetimeauth_PRIMITIVE: &'static [u8; 9usize] = b"poly1305\0";
117 pub const crypto_pwhash_argon2i_ALG_ARGON2I13: u32 = 1;
118 pub const crypto_pwhash_argon2i_BYTES_MIN: u32 = 16;
119 pub const crypto_pwhash_argon2i_PASSWD_MIN: u32 = 0;
120 pub const crypto_pwhash_argon2i_PASSWD_MAX: u32 = 4294967295;
121 pub const crypto_pwhash_argon2i_SALTBYTES: u32 = 16;
122 pub const crypto_pwhash_argon2i_STRBYTES: u32 = 128;
123 pub const crypto_pwhash_argon2i_STRPREFIX: &'static [u8; 10usize] = b"$argon2i$\0";
124 pub const crypto_pwhash_argon2i_OPSLIMIT_MIN: u32 = 3;
125 pub const crypto_pwhash_argon2i_OPSLIMIT_MAX: u32 = 4294967295;
126 pub const crypto_pwhash_argon2i_MEMLIMIT_MIN: u32 = 8192;
127 pub const crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE: u32 = 4;
128 pub const crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE: u32 = 33554432;
129 pub const crypto_pwhash_argon2i_OPSLIMIT_MODERATE: u32 = 6;
130 pub const crypto_pwhash_argon2i_MEMLIMIT_MODERATE: u32 = 134217728;
131 pub const crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE: u32 = 8;
132 pub const crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE: u32 = 536870912;
133 pub const crypto_pwhash_argon2id_ALG_ARGON2ID13: u32 = 2;
134 pub const crypto_pwhash_argon2id_BYTES_MIN: u32 = 16;
135 pub const crypto_pwhash_argon2id_PASSWD_MIN: u32 = 0;
136 pub const crypto_pwhash_argon2id_PASSWD_MAX: u32 = 4294967295;
137 pub const crypto_pwhash_argon2id_SALTBYTES: u32 = 16;
138 pub const crypto_pwhash_argon2id_STRBYTES: u32 = 128;
139 pub const crypto_pwhash_argon2id_STRPREFIX: &'static [u8; 11usize] = b"$argon2id$\0";
140 pub const crypto_pwhash_argon2id_OPSLIMIT_MIN: u32 = 1;
141 pub const crypto_pwhash_argon2id_OPSLIMIT_MAX: u32 = 4294967295;
142 pub const crypto_pwhash_argon2id_MEMLIMIT_MIN: u32 = 8192;
143 pub const crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE: u32 = 2;
144 pub const crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE: u32 = 67108864;
145 pub const crypto_pwhash_argon2id_OPSLIMIT_MODERATE: u32 = 3;
146 pub const crypto_pwhash_argon2id_MEMLIMIT_MODERATE: u32 = 268435456;
147 pub const crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE: u32 = 4;
148 pub const crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE: u32 = 1073741824;
149 pub const crypto_pwhash_ALG_ARGON2I13: u32 = 1;
150 pub const crypto_pwhash_ALG_ARGON2ID13: u32 = 2;
151 pub const crypto_pwhash_ALG_DEFAULT: u32 = 2;
152 pub const crypto_pwhash_BYTES_MIN: u32 = 16;
153 pub const crypto_pwhash_PASSWD_MIN: u32 = 0;
154 pub const crypto_pwhash_PASSWD_MAX: u32 = 4294967295;
155 pub const crypto_pwhash_SALTBYTES: u32 = 16;
156 pub const crypto_pwhash_STRBYTES: u32 = 128;
157 pub const crypto_pwhash_STRPREFIX: &'static [u8; 11usize] = b"$argon2id$\0";
158 pub const crypto_pwhash_OPSLIMIT_MIN: u32 = 1;
159 pub const crypto_pwhash_OPSLIMIT_MAX: u32 = 4294967295;
160 pub const crypto_pwhash_MEMLIMIT_MIN: u32 = 8192;
161 pub const crypto_pwhash_OPSLIMIT_INTERACTIVE: u32 = 2;
162 pub const crypto_pwhash_MEMLIMIT_INTERACTIVE: u32 = 67108864;
163 pub const crypto_pwhash_OPSLIMIT_MODERATE: u32 = 3;
164 pub const crypto_pwhash_MEMLIMIT_MODERATE: u32 = 268435456;
165 pub const crypto_pwhash_OPSLIMIT_SENSITIVE: u32 = 4;
166 pub const crypto_pwhash_MEMLIMIT_SENSITIVE: u32 = 1073741824;
167 pub const crypto_pwhash_PRIMITIVE: &'static [u8; 8usize] = b"argon2i\0";
168 pub const crypto_scalarmult_curve25519_BYTES: u32 = 32;
169 pub const crypto_scalarmult_curve25519_SCALARBYTES: u32 = 32;
170 pub const crypto_scalarmult_BYTES: u32 = 32;
171 pub const crypto_scalarmult_SCALARBYTES: u32 = 32;
172 pub const crypto_scalarmult_PRIMITIVE: &'static [u8; 11usize] = b"curve25519\0";
173 pub const crypto_secretbox_xsalsa20poly1305_KEYBYTES: u32 = 32;
174 pub const crypto_secretbox_xsalsa20poly1305_NONCEBYTES: u32 = 24;
175 pub const crypto_secretbox_xsalsa20poly1305_MACBYTES: u32 = 16;
176 pub const crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES: u32 = 16;
177 pub const crypto_secretbox_xsalsa20poly1305_ZEROBYTES: u32 = 32;
178 pub const crypto_secretbox_KEYBYTES: u32 = 32;
179 pub const crypto_secretbox_NONCEBYTES: u32 = 24;
180 pub const crypto_secretbox_MACBYTES: u32 = 16;
181 pub const crypto_secretbox_PRIMITIVE: &'static [u8; 17usize] = b"xsalsa20poly1305\0";
182 pub const crypto_secretbox_ZEROBYTES: u32 = 32;
183 pub const crypto_secretbox_BOXZEROBYTES: u32 = 16;
184 pub const crypto_stream_chacha20_KEYBYTES: u32 = 32;
185 pub const crypto_stream_chacha20_NONCEBYTES: u32 = 8;
186 pub const crypto_stream_chacha20_ietf_KEYBYTES: u32 = 32;
187 pub const crypto_stream_chacha20_ietf_NONCEBYTES: u32 = 12;
188 pub const crypto_stream_chacha20_IETF_KEYBYTES: u32 = 32;
189 pub const crypto_stream_chacha20_IETF_NONCEBYTES: u32 = 12;
190 pub const crypto_secretstream_xchacha20poly1305_ABYTES: u32 = 17;
191 pub const crypto_secretstream_xchacha20poly1305_HEADERBYTES: u32 = 24;
192 pub const crypto_secretstream_xchacha20poly1305_KEYBYTES: u32 = 32;
193 pub const crypto_secretstream_xchacha20poly1305_TAG_MESSAGE: u32 = 0;
194 pub const crypto_secretstream_xchacha20poly1305_TAG_PUSH: u32 = 1;
195 pub const crypto_secretstream_xchacha20poly1305_TAG_REKEY: u32 = 2;
196 pub const crypto_secretstream_xchacha20poly1305_TAG_FINAL: u32 = 3;
197 pub const crypto_shorthash_siphash24_BYTES: u32 = 8;
198 pub const crypto_shorthash_siphash24_KEYBYTES: u32 = 16;
199 pub const crypto_shorthash_siphashx24_BYTES: u32 = 16;
200 pub const crypto_shorthash_siphashx24_KEYBYTES: u32 = 16;
201 pub const crypto_shorthash_BYTES: u32 = 8;
202 pub const crypto_shorthash_KEYBYTES: u32 = 16;
203 pub const crypto_shorthash_PRIMITIVE: &'static [u8; 10usize] = b"siphash24\0";
204 pub const crypto_sign_ed25519_BYTES: u32 = 64;
205 pub const crypto_sign_ed25519_SEEDBYTES: u32 = 32;
206 pub const crypto_sign_ed25519_PUBLICKEYBYTES: u32 = 32;
207 pub const crypto_sign_ed25519_SECRETKEYBYTES: u32 = 64;
208 pub const crypto_sign_BYTES: u32 = 64;
209 pub const crypto_sign_SEEDBYTES: u32 = 32;
210 pub const crypto_sign_PUBLICKEYBYTES: u32 = 32;
211 pub const crypto_sign_SECRETKEYBYTES: u32 = 64;
212 pub const crypto_sign_PRIMITIVE: &'static [u8; 8usize] = b"ed25519\0";
213 pub const crypto_stream_KEYBYTES: u32 = 32;
214 pub const crypto_stream_NONCEBYTES: u32 = 24;
215 pub const crypto_stream_PRIMITIVE: &'static [u8; 9usize] = b"xsalsa20\0";
216 pub const crypto_stream_salsa20_KEYBYTES: u32 = 32;
217 pub const crypto_stream_salsa20_NONCEBYTES: u32 = 8;
218 pub const crypto_verify_16_BYTES: u32 = 16;
219 pub const crypto_verify_32_BYTES: u32 = 32;
220 pub const crypto_verify_64_BYTES: u32 = 64;
221 pub const randombytes_SEEDBYTES: u32 = 32;
222 pub const sodium_base64_VARIANT_ORIGINAL: u32 = 1;
223 pub const sodium_base64_VARIANT_ORIGINAL_NO_PADDING: u32 = 3;
224 pub const sodium_base64_VARIANT_URLSAFE: u32 = 5;
225 pub const sodium_base64_VARIANT_URLSAFE_NO_PADDING: u32 = 7;
226 pub const crypto_stream_xchacha20_KEYBYTES: u32 = 32;
227 pub const crypto_stream_xchacha20_NONCEBYTES: u32 = 24;
228 pub const crypto_box_curve25519xchacha20poly1305_SEEDBYTES: u32 = 32;
229 pub const crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES: u32 = 32;
230 pub const crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES: u32 = 32;
231 pub const crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES: u32 = 32;
232 pub const crypto_box_curve25519xchacha20poly1305_NONCEBYTES: u32 = 24;
233 pub const crypto_box_curve25519xchacha20poly1305_MACBYTES: u32 = 16;
234 pub const crypto_box_curve25519xchacha20poly1305_SEALBYTES: u32 = 48;
235 pub const crypto_core_ed25519_BYTES: u32 = 32;
236 pub const crypto_core_ed25519_UNIFORMBYTES: u32 = 32;
237 pub const crypto_core_ed25519_HASHBYTES: u32 = 64;
238 pub const crypto_core_ed25519_SCALARBYTES: u32 = 32;
239 pub const crypto_core_ed25519_NONREDUCEDSCALARBYTES: u32 = 64;
240 pub const crypto_core_ristretto255_BYTES: u32 = 32;
241 pub const crypto_core_ristretto255_HASHBYTES: u32 = 64;
242 pub const crypto_core_ristretto255_SCALARBYTES: u32 = 32;
243 pub const crypto_core_ristretto255_NONREDUCEDSCALARBYTES: u32 = 64;
244 pub const crypto_scalarmult_ed25519_BYTES: u32 = 32;
245 pub const crypto_scalarmult_ed25519_SCALARBYTES: u32 = 32;
246 pub const crypto_scalarmult_ristretto255_BYTES: u32 = 32;
247 pub const crypto_scalarmult_ristretto255_SCALARBYTES: u32 = 32;
248 pub const crypto_secretbox_xchacha20poly1305_KEYBYTES: u32 = 32;
249 pub const crypto_secretbox_xchacha20poly1305_NONCEBYTES: u32 = 24;
250 pub const crypto_secretbox_xchacha20poly1305_MACBYTES: u32 = 16;
251 pub const crypto_pwhash_scryptsalsa208sha256_BYTES_MIN: u32 = 16;
252 pub const crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN: u32 = 0;
253 pub const crypto_pwhash_scryptsalsa208sha256_SALTBYTES: u32 = 32;
254 pub const crypto_pwhash_scryptsalsa208sha256_STRBYTES: u32 = 102;
255 pub const crypto_pwhash_scryptsalsa208sha256_STRPREFIX: &'static [u8; 4usize] = b"$7$\0";
256 pub const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN: u32 = 32768;
257 pub const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX: u32 = 4294967295;
258 pub const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN: u32 = 16777216;
259 pub const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE: u32 = 524288;
260 pub const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE: u32 = 16777216;
261 pub const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE: u32 = 33554432;
262 pub const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE: u32 = 1073741824;
263 pub const crypto_stream_salsa2012_KEYBYTES: u32 = 32;
264 pub const crypto_stream_salsa2012_NONCEBYTES: u32 = 8;
265 pub const crypto_stream_salsa208_KEYBYTES: u32 = 32;
266 pub const crypto_stream_salsa208_NONCEBYTES: u32 = 8;
267 extern "C" {
sodium_version_string() -> *const libc::c_char268 pub fn sodium_version_string() -> *const libc::c_char;
269 }
270 extern "C" {
sodium_library_version_major() -> libc::c_int271 pub fn sodium_library_version_major() -> libc::c_int;
272 }
273 extern "C" {
sodium_library_version_minor() -> libc::c_int274 pub fn sodium_library_version_minor() -> libc::c_int;
275 }
276 extern "C" {
sodium_library_minimal() -> libc::c_int277 pub fn sodium_library_minimal() -> libc::c_int;
278 }
279 extern "C" {
sodium_init() -> libc::c_int280 pub fn sodium_init() -> libc::c_int;
281 }
282 extern "C" {
sodium_set_misuse_handler( handler: ::core::option::Option<unsafe extern "C" fn()>, ) -> libc::c_int283 pub fn sodium_set_misuse_handler(
284 handler: ::core::option::Option<unsafe extern "C" fn()>,
285 ) -> libc::c_int;
286 }
287 extern "C" {
sodium_misuse()288 pub fn sodium_misuse();
289 }
290 extern "C" {
crypto_aead_aes256gcm_is_available() -> libc::c_int291 pub fn crypto_aead_aes256gcm_is_available() -> libc::c_int;
292 }
293 extern "C" {
crypto_aead_aes256gcm_keybytes() -> usize294 pub fn crypto_aead_aes256gcm_keybytes() -> usize;
295 }
296 extern "C" {
crypto_aead_aes256gcm_nsecbytes() -> usize297 pub fn crypto_aead_aes256gcm_nsecbytes() -> usize;
298 }
299 extern "C" {
crypto_aead_aes256gcm_npubbytes() -> usize300 pub fn crypto_aead_aes256gcm_npubbytes() -> usize;
301 }
302 extern "C" {
crypto_aead_aes256gcm_abytes() -> usize303 pub fn crypto_aead_aes256gcm_abytes() -> usize;
304 }
305 extern "C" {
crypto_aead_aes256gcm_messagebytes_max() -> usize306 pub fn crypto_aead_aes256gcm_messagebytes_max() -> usize;
307 }
308 #[repr(C)]
309 #[repr(align(16))]
310 #[derive(Debug, Copy, Clone)]
311 pub struct crypto_aead_aes256gcm_state_ {
312 pub opaque: [libc::c_uchar; 512usize],
313 }
314 #[test]
bindgen_test_layout_crypto_aead_aes256gcm_state_()315 fn bindgen_test_layout_crypto_aead_aes256gcm_state_() {
316 assert_eq!(
317 ::core::mem::size_of::<crypto_aead_aes256gcm_state_>(),
318 512usize,
319 concat!("Size of: ", stringify!(crypto_aead_aes256gcm_state_))
320 );
321 assert_eq!(
322 ::core::mem::align_of::<crypto_aead_aes256gcm_state_>(),
323 16usize,
324 concat!("Alignment of ", stringify!(crypto_aead_aes256gcm_state_))
325 );
326 assert_eq!(
327 unsafe {
328 &(*(::core::ptr::null::<crypto_aead_aes256gcm_state_>())).opaque as *const _ as usize
329 },
330 0usize,
331 concat!(
332 "Offset of field: ",
333 stringify!(crypto_aead_aes256gcm_state_),
334 "::",
335 stringify!(opaque)
336 )
337 );
338 }
339 pub type crypto_aead_aes256gcm_state = crypto_aead_aes256gcm_state_;
340 extern "C" {
crypto_aead_aes256gcm_statebytes() -> usize341 pub fn crypto_aead_aes256gcm_statebytes() -> usize;
342 }
343 extern "C" {
crypto_aead_aes256gcm_encrypt( c: *mut libc::c_uchar, clen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int344 pub fn crypto_aead_aes256gcm_encrypt(
345 c: *mut libc::c_uchar,
346 clen_p: *mut libc::c_ulonglong,
347 m: *const libc::c_uchar,
348 mlen: libc::c_ulonglong,
349 ad: *const libc::c_uchar,
350 adlen: libc::c_ulonglong,
351 nsec: *const libc::c_uchar,
352 npub: *const libc::c_uchar,
353 k: *const libc::c_uchar,
354 ) -> libc::c_int;
355 }
356 extern "C" {
crypto_aead_aes256gcm_decrypt( m: *mut libc::c_uchar, mlen_p: *mut libc::c_ulonglong, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int357 pub fn crypto_aead_aes256gcm_decrypt(
358 m: *mut libc::c_uchar,
359 mlen_p: *mut libc::c_ulonglong,
360 nsec: *mut libc::c_uchar,
361 c: *const libc::c_uchar,
362 clen: libc::c_ulonglong,
363 ad: *const libc::c_uchar,
364 adlen: libc::c_ulonglong,
365 npub: *const libc::c_uchar,
366 k: *const libc::c_uchar,
367 ) -> libc::c_int;
368 }
369 extern "C" {
crypto_aead_aes256gcm_encrypt_detached( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, maclen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int370 pub fn crypto_aead_aes256gcm_encrypt_detached(
371 c: *mut libc::c_uchar,
372 mac: *mut libc::c_uchar,
373 maclen_p: *mut libc::c_ulonglong,
374 m: *const libc::c_uchar,
375 mlen: libc::c_ulonglong,
376 ad: *const libc::c_uchar,
377 adlen: libc::c_ulonglong,
378 nsec: *const libc::c_uchar,
379 npub: *const libc::c_uchar,
380 k: *const libc::c_uchar,
381 ) -> libc::c_int;
382 }
383 extern "C" {
crypto_aead_aes256gcm_decrypt_detached( m: *mut libc::c_uchar, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, mac: *const libc::c_uchar, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int384 pub fn crypto_aead_aes256gcm_decrypt_detached(
385 m: *mut libc::c_uchar,
386 nsec: *mut libc::c_uchar,
387 c: *const libc::c_uchar,
388 clen: libc::c_ulonglong,
389 mac: *const libc::c_uchar,
390 ad: *const libc::c_uchar,
391 adlen: libc::c_ulonglong,
392 npub: *const libc::c_uchar,
393 k: *const libc::c_uchar,
394 ) -> libc::c_int;
395 }
396 extern "C" {
crypto_aead_aes256gcm_beforenm( ctx_: *mut crypto_aead_aes256gcm_state, k: *const libc::c_uchar, ) -> libc::c_int397 pub fn crypto_aead_aes256gcm_beforenm(
398 ctx_: *mut crypto_aead_aes256gcm_state,
399 k: *const libc::c_uchar,
400 ) -> libc::c_int;
401 }
402 extern "C" {
crypto_aead_aes256gcm_encrypt_afternm( c: *mut libc::c_uchar, clen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, ctx_: *const crypto_aead_aes256gcm_state, ) -> libc::c_int403 pub fn crypto_aead_aes256gcm_encrypt_afternm(
404 c: *mut libc::c_uchar,
405 clen_p: *mut libc::c_ulonglong,
406 m: *const libc::c_uchar,
407 mlen: libc::c_ulonglong,
408 ad: *const libc::c_uchar,
409 adlen: libc::c_ulonglong,
410 nsec: *const libc::c_uchar,
411 npub: *const libc::c_uchar,
412 ctx_: *const crypto_aead_aes256gcm_state,
413 ) -> libc::c_int;
414 }
415 extern "C" {
crypto_aead_aes256gcm_decrypt_afternm( m: *mut libc::c_uchar, mlen_p: *mut libc::c_ulonglong, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, ctx_: *const crypto_aead_aes256gcm_state, ) -> libc::c_int416 pub fn crypto_aead_aes256gcm_decrypt_afternm(
417 m: *mut libc::c_uchar,
418 mlen_p: *mut libc::c_ulonglong,
419 nsec: *mut libc::c_uchar,
420 c: *const libc::c_uchar,
421 clen: libc::c_ulonglong,
422 ad: *const libc::c_uchar,
423 adlen: libc::c_ulonglong,
424 npub: *const libc::c_uchar,
425 ctx_: *const crypto_aead_aes256gcm_state,
426 ) -> libc::c_int;
427 }
428 extern "C" {
crypto_aead_aes256gcm_encrypt_detached_afternm( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, maclen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, ctx_: *const crypto_aead_aes256gcm_state, ) -> libc::c_int429 pub fn crypto_aead_aes256gcm_encrypt_detached_afternm(
430 c: *mut libc::c_uchar,
431 mac: *mut libc::c_uchar,
432 maclen_p: *mut libc::c_ulonglong,
433 m: *const libc::c_uchar,
434 mlen: libc::c_ulonglong,
435 ad: *const libc::c_uchar,
436 adlen: libc::c_ulonglong,
437 nsec: *const libc::c_uchar,
438 npub: *const libc::c_uchar,
439 ctx_: *const crypto_aead_aes256gcm_state,
440 ) -> libc::c_int;
441 }
442 extern "C" {
crypto_aead_aes256gcm_decrypt_detached_afternm( m: *mut libc::c_uchar, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, mac: *const libc::c_uchar, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, ctx_: *const crypto_aead_aes256gcm_state, ) -> libc::c_int443 pub fn crypto_aead_aes256gcm_decrypt_detached_afternm(
444 m: *mut libc::c_uchar,
445 nsec: *mut libc::c_uchar,
446 c: *const libc::c_uchar,
447 clen: libc::c_ulonglong,
448 mac: *const libc::c_uchar,
449 ad: *const libc::c_uchar,
450 adlen: libc::c_ulonglong,
451 npub: *const libc::c_uchar,
452 ctx_: *const crypto_aead_aes256gcm_state,
453 ) -> libc::c_int;
454 }
455 extern "C" {
crypto_aead_aes256gcm_keygen(k: *mut libc::c_uchar)456 pub fn crypto_aead_aes256gcm_keygen(k: *mut libc::c_uchar);
457 }
458 extern "C" {
crypto_aead_chacha20poly1305_ietf_keybytes() -> usize459 pub fn crypto_aead_chacha20poly1305_ietf_keybytes() -> usize;
460 }
461 extern "C" {
crypto_aead_chacha20poly1305_ietf_nsecbytes() -> usize462 pub fn crypto_aead_chacha20poly1305_ietf_nsecbytes() -> usize;
463 }
464 extern "C" {
crypto_aead_chacha20poly1305_ietf_npubbytes() -> usize465 pub fn crypto_aead_chacha20poly1305_ietf_npubbytes() -> usize;
466 }
467 extern "C" {
crypto_aead_chacha20poly1305_ietf_abytes() -> usize468 pub fn crypto_aead_chacha20poly1305_ietf_abytes() -> usize;
469 }
470 extern "C" {
crypto_aead_chacha20poly1305_ietf_messagebytes_max() -> usize471 pub fn crypto_aead_chacha20poly1305_ietf_messagebytes_max() -> usize;
472 }
473 extern "C" {
crypto_aead_chacha20poly1305_ietf_encrypt( c: *mut libc::c_uchar, clen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int474 pub fn crypto_aead_chacha20poly1305_ietf_encrypt(
475 c: *mut libc::c_uchar,
476 clen_p: *mut libc::c_ulonglong,
477 m: *const libc::c_uchar,
478 mlen: libc::c_ulonglong,
479 ad: *const libc::c_uchar,
480 adlen: libc::c_ulonglong,
481 nsec: *const libc::c_uchar,
482 npub: *const libc::c_uchar,
483 k: *const libc::c_uchar,
484 ) -> libc::c_int;
485 }
486 extern "C" {
crypto_aead_chacha20poly1305_ietf_decrypt( m: *mut libc::c_uchar, mlen_p: *mut libc::c_ulonglong, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int487 pub fn crypto_aead_chacha20poly1305_ietf_decrypt(
488 m: *mut libc::c_uchar,
489 mlen_p: *mut libc::c_ulonglong,
490 nsec: *mut libc::c_uchar,
491 c: *const libc::c_uchar,
492 clen: libc::c_ulonglong,
493 ad: *const libc::c_uchar,
494 adlen: libc::c_ulonglong,
495 npub: *const libc::c_uchar,
496 k: *const libc::c_uchar,
497 ) -> libc::c_int;
498 }
499 extern "C" {
crypto_aead_chacha20poly1305_ietf_encrypt_detached( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, maclen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int500 pub fn crypto_aead_chacha20poly1305_ietf_encrypt_detached(
501 c: *mut libc::c_uchar,
502 mac: *mut libc::c_uchar,
503 maclen_p: *mut libc::c_ulonglong,
504 m: *const libc::c_uchar,
505 mlen: libc::c_ulonglong,
506 ad: *const libc::c_uchar,
507 adlen: libc::c_ulonglong,
508 nsec: *const libc::c_uchar,
509 npub: *const libc::c_uchar,
510 k: *const libc::c_uchar,
511 ) -> libc::c_int;
512 }
513 extern "C" {
crypto_aead_chacha20poly1305_ietf_decrypt_detached( m: *mut libc::c_uchar, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, mac: *const libc::c_uchar, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int514 pub fn crypto_aead_chacha20poly1305_ietf_decrypt_detached(
515 m: *mut libc::c_uchar,
516 nsec: *mut libc::c_uchar,
517 c: *const libc::c_uchar,
518 clen: libc::c_ulonglong,
519 mac: *const libc::c_uchar,
520 ad: *const libc::c_uchar,
521 adlen: libc::c_ulonglong,
522 npub: *const libc::c_uchar,
523 k: *const libc::c_uchar,
524 ) -> libc::c_int;
525 }
526 extern "C" {
crypto_aead_chacha20poly1305_ietf_keygen(k: *mut libc::c_uchar)527 pub fn crypto_aead_chacha20poly1305_ietf_keygen(k: *mut libc::c_uchar);
528 }
529 extern "C" {
crypto_aead_chacha20poly1305_keybytes() -> usize530 pub fn crypto_aead_chacha20poly1305_keybytes() -> usize;
531 }
532 extern "C" {
crypto_aead_chacha20poly1305_nsecbytes() -> usize533 pub fn crypto_aead_chacha20poly1305_nsecbytes() -> usize;
534 }
535 extern "C" {
crypto_aead_chacha20poly1305_npubbytes() -> usize536 pub fn crypto_aead_chacha20poly1305_npubbytes() -> usize;
537 }
538 extern "C" {
crypto_aead_chacha20poly1305_abytes() -> usize539 pub fn crypto_aead_chacha20poly1305_abytes() -> usize;
540 }
541 extern "C" {
crypto_aead_chacha20poly1305_messagebytes_max() -> usize542 pub fn crypto_aead_chacha20poly1305_messagebytes_max() -> usize;
543 }
544 extern "C" {
crypto_aead_chacha20poly1305_encrypt( c: *mut libc::c_uchar, clen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int545 pub fn crypto_aead_chacha20poly1305_encrypt(
546 c: *mut libc::c_uchar,
547 clen_p: *mut libc::c_ulonglong,
548 m: *const libc::c_uchar,
549 mlen: libc::c_ulonglong,
550 ad: *const libc::c_uchar,
551 adlen: libc::c_ulonglong,
552 nsec: *const libc::c_uchar,
553 npub: *const libc::c_uchar,
554 k: *const libc::c_uchar,
555 ) -> libc::c_int;
556 }
557 extern "C" {
crypto_aead_chacha20poly1305_decrypt( m: *mut libc::c_uchar, mlen_p: *mut libc::c_ulonglong, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int558 pub fn crypto_aead_chacha20poly1305_decrypt(
559 m: *mut libc::c_uchar,
560 mlen_p: *mut libc::c_ulonglong,
561 nsec: *mut libc::c_uchar,
562 c: *const libc::c_uchar,
563 clen: libc::c_ulonglong,
564 ad: *const libc::c_uchar,
565 adlen: libc::c_ulonglong,
566 npub: *const libc::c_uchar,
567 k: *const libc::c_uchar,
568 ) -> libc::c_int;
569 }
570 extern "C" {
crypto_aead_chacha20poly1305_encrypt_detached( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, maclen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int571 pub fn crypto_aead_chacha20poly1305_encrypt_detached(
572 c: *mut libc::c_uchar,
573 mac: *mut libc::c_uchar,
574 maclen_p: *mut libc::c_ulonglong,
575 m: *const libc::c_uchar,
576 mlen: libc::c_ulonglong,
577 ad: *const libc::c_uchar,
578 adlen: libc::c_ulonglong,
579 nsec: *const libc::c_uchar,
580 npub: *const libc::c_uchar,
581 k: *const libc::c_uchar,
582 ) -> libc::c_int;
583 }
584 extern "C" {
crypto_aead_chacha20poly1305_decrypt_detached( m: *mut libc::c_uchar, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, mac: *const libc::c_uchar, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int585 pub fn crypto_aead_chacha20poly1305_decrypt_detached(
586 m: *mut libc::c_uchar,
587 nsec: *mut libc::c_uchar,
588 c: *const libc::c_uchar,
589 clen: libc::c_ulonglong,
590 mac: *const libc::c_uchar,
591 ad: *const libc::c_uchar,
592 adlen: libc::c_ulonglong,
593 npub: *const libc::c_uchar,
594 k: *const libc::c_uchar,
595 ) -> libc::c_int;
596 }
597 extern "C" {
crypto_aead_chacha20poly1305_keygen(k: *mut libc::c_uchar)598 pub fn crypto_aead_chacha20poly1305_keygen(k: *mut libc::c_uchar);
599 }
600 extern "C" {
crypto_aead_xchacha20poly1305_ietf_keybytes() -> usize601 pub fn crypto_aead_xchacha20poly1305_ietf_keybytes() -> usize;
602 }
603 extern "C" {
crypto_aead_xchacha20poly1305_ietf_nsecbytes() -> usize604 pub fn crypto_aead_xchacha20poly1305_ietf_nsecbytes() -> usize;
605 }
606 extern "C" {
crypto_aead_xchacha20poly1305_ietf_npubbytes() -> usize607 pub fn crypto_aead_xchacha20poly1305_ietf_npubbytes() -> usize;
608 }
609 extern "C" {
crypto_aead_xchacha20poly1305_ietf_abytes() -> usize610 pub fn crypto_aead_xchacha20poly1305_ietf_abytes() -> usize;
611 }
612 extern "C" {
crypto_aead_xchacha20poly1305_ietf_messagebytes_max() -> usize613 pub fn crypto_aead_xchacha20poly1305_ietf_messagebytes_max() -> usize;
614 }
615 extern "C" {
crypto_aead_xchacha20poly1305_ietf_encrypt( c: *mut libc::c_uchar, clen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int616 pub fn crypto_aead_xchacha20poly1305_ietf_encrypt(
617 c: *mut libc::c_uchar,
618 clen_p: *mut libc::c_ulonglong,
619 m: *const libc::c_uchar,
620 mlen: libc::c_ulonglong,
621 ad: *const libc::c_uchar,
622 adlen: libc::c_ulonglong,
623 nsec: *const libc::c_uchar,
624 npub: *const libc::c_uchar,
625 k: *const libc::c_uchar,
626 ) -> libc::c_int;
627 }
628 extern "C" {
crypto_aead_xchacha20poly1305_ietf_decrypt( m: *mut libc::c_uchar, mlen_p: *mut libc::c_ulonglong, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int629 pub fn crypto_aead_xchacha20poly1305_ietf_decrypt(
630 m: *mut libc::c_uchar,
631 mlen_p: *mut libc::c_ulonglong,
632 nsec: *mut libc::c_uchar,
633 c: *const libc::c_uchar,
634 clen: libc::c_ulonglong,
635 ad: *const libc::c_uchar,
636 adlen: libc::c_ulonglong,
637 npub: *const libc::c_uchar,
638 k: *const libc::c_uchar,
639 ) -> libc::c_int;
640 }
641 extern "C" {
crypto_aead_xchacha20poly1305_ietf_encrypt_detached( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, maclen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, nsec: *const libc::c_uchar, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int642 pub fn crypto_aead_xchacha20poly1305_ietf_encrypt_detached(
643 c: *mut libc::c_uchar,
644 mac: *mut libc::c_uchar,
645 maclen_p: *mut libc::c_ulonglong,
646 m: *const libc::c_uchar,
647 mlen: libc::c_ulonglong,
648 ad: *const libc::c_uchar,
649 adlen: libc::c_ulonglong,
650 nsec: *const libc::c_uchar,
651 npub: *const libc::c_uchar,
652 k: *const libc::c_uchar,
653 ) -> libc::c_int;
654 }
655 extern "C" {
crypto_aead_xchacha20poly1305_ietf_decrypt_detached( m: *mut libc::c_uchar, nsec: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, mac: *const libc::c_uchar, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, npub: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int656 pub fn crypto_aead_xchacha20poly1305_ietf_decrypt_detached(
657 m: *mut libc::c_uchar,
658 nsec: *mut libc::c_uchar,
659 c: *const libc::c_uchar,
660 clen: libc::c_ulonglong,
661 mac: *const libc::c_uchar,
662 ad: *const libc::c_uchar,
663 adlen: libc::c_ulonglong,
664 npub: *const libc::c_uchar,
665 k: *const libc::c_uchar,
666 ) -> libc::c_int;
667 }
668 extern "C" {
crypto_aead_xchacha20poly1305_ietf_keygen(k: *mut libc::c_uchar)669 pub fn crypto_aead_xchacha20poly1305_ietf_keygen(k: *mut libc::c_uchar);
670 }
671 #[repr(C)]
672 #[derive(Debug, Copy, Clone)]
673 pub struct crypto_hash_sha512_state {
674 pub state: [u64; 8usize],
675 pub count: [u64; 2usize],
676 pub buf: [u8; 128usize],
677 }
678 #[test]
bindgen_test_layout_crypto_hash_sha512_state()679 fn bindgen_test_layout_crypto_hash_sha512_state() {
680 assert_eq!(
681 ::core::mem::size_of::<crypto_hash_sha512_state>(),
682 208usize,
683 concat!("Size of: ", stringify!(crypto_hash_sha512_state))
684 );
685 assert_eq!(
686 ::core::mem::align_of::<crypto_hash_sha512_state>(),
687 8usize,
688 concat!("Alignment of ", stringify!(crypto_hash_sha512_state))
689 );
690 assert_eq!(
691 unsafe { &(*(::core::ptr::null::<crypto_hash_sha512_state>())).state as *const _ as usize },
692 0usize,
693 concat!(
694 "Offset of field: ",
695 stringify!(crypto_hash_sha512_state),
696 "::",
697 stringify!(state)
698 )
699 );
700 assert_eq!(
701 unsafe { &(*(::core::ptr::null::<crypto_hash_sha512_state>())).count as *const _ as usize },
702 64usize,
703 concat!(
704 "Offset of field: ",
705 stringify!(crypto_hash_sha512_state),
706 "::",
707 stringify!(count)
708 )
709 );
710 assert_eq!(
711 unsafe { &(*(::core::ptr::null::<crypto_hash_sha512_state>())).buf as *const _ as usize },
712 80usize,
713 concat!(
714 "Offset of field: ",
715 stringify!(crypto_hash_sha512_state),
716 "::",
717 stringify!(buf)
718 )
719 );
720 }
721 extern "C" {
crypto_hash_sha512_statebytes() -> usize722 pub fn crypto_hash_sha512_statebytes() -> usize;
723 }
724 extern "C" {
crypto_hash_sha512_bytes() -> usize725 pub fn crypto_hash_sha512_bytes() -> usize;
726 }
727 extern "C" {
crypto_hash_sha512( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int728 pub fn crypto_hash_sha512(
729 out: *mut libc::c_uchar,
730 in_: *const libc::c_uchar,
731 inlen: libc::c_ulonglong,
732 ) -> libc::c_int;
733 }
734 extern "C" {
crypto_hash_sha512_init(state: *mut crypto_hash_sha512_state) -> libc::c_int735 pub fn crypto_hash_sha512_init(state: *mut crypto_hash_sha512_state) -> libc::c_int;
736 }
737 extern "C" {
crypto_hash_sha512_update( state: *mut crypto_hash_sha512_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int738 pub fn crypto_hash_sha512_update(
739 state: *mut crypto_hash_sha512_state,
740 in_: *const libc::c_uchar,
741 inlen: libc::c_ulonglong,
742 ) -> libc::c_int;
743 }
744 extern "C" {
crypto_hash_sha512_final( state: *mut crypto_hash_sha512_state, out: *mut libc::c_uchar, ) -> libc::c_int745 pub fn crypto_hash_sha512_final(
746 state: *mut crypto_hash_sha512_state,
747 out: *mut libc::c_uchar,
748 ) -> libc::c_int;
749 }
750 extern "C" {
crypto_auth_hmacsha512_bytes() -> usize751 pub fn crypto_auth_hmacsha512_bytes() -> usize;
752 }
753 extern "C" {
crypto_auth_hmacsha512_keybytes() -> usize754 pub fn crypto_auth_hmacsha512_keybytes() -> usize;
755 }
756 extern "C" {
crypto_auth_hmacsha512( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int757 pub fn crypto_auth_hmacsha512(
758 out: *mut libc::c_uchar,
759 in_: *const libc::c_uchar,
760 inlen: libc::c_ulonglong,
761 k: *const libc::c_uchar,
762 ) -> libc::c_int;
763 }
764 extern "C" {
crypto_auth_hmacsha512_verify( h: *const libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int765 pub fn crypto_auth_hmacsha512_verify(
766 h: *const libc::c_uchar,
767 in_: *const libc::c_uchar,
768 inlen: libc::c_ulonglong,
769 k: *const libc::c_uchar,
770 ) -> libc::c_int;
771 }
772 #[repr(C)]
773 #[derive(Debug, Copy, Clone)]
774 pub struct crypto_auth_hmacsha512_state {
775 pub ictx: crypto_hash_sha512_state,
776 pub octx: crypto_hash_sha512_state,
777 }
778 #[test]
bindgen_test_layout_crypto_auth_hmacsha512_state()779 fn bindgen_test_layout_crypto_auth_hmacsha512_state() {
780 assert_eq!(
781 ::core::mem::size_of::<crypto_auth_hmacsha512_state>(),
782 416usize,
783 concat!("Size of: ", stringify!(crypto_auth_hmacsha512_state))
784 );
785 assert_eq!(
786 ::core::mem::align_of::<crypto_auth_hmacsha512_state>(),
787 8usize,
788 concat!("Alignment of ", stringify!(crypto_auth_hmacsha512_state))
789 );
790 assert_eq!(
791 unsafe {
792 &(*(::core::ptr::null::<crypto_auth_hmacsha512_state>())).ictx as *const _ as usize
793 },
794 0usize,
795 concat!(
796 "Offset of field: ",
797 stringify!(crypto_auth_hmacsha512_state),
798 "::",
799 stringify!(ictx)
800 )
801 );
802 assert_eq!(
803 unsafe {
804 &(*(::core::ptr::null::<crypto_auth_hmacsha512_state>())).octx as *const _ as usize
805 },
806 208usize,
807 concat!(
808 "Offset of field: ",
809 stringify!(crypto_auth_hmacsha512_state),
810 "::",
811 stringify!(octx)
812 )
813 );
814 }
815 extern "C" {
crypto_auth_hmacsha512_statebytes() -> usize816 pub fn crypto_auth_hmacsha512_statebytes() -> usize;
817 }
818 extern "C" {
crypto_auth_hmacsha512_init( state: *mut crypto_auth_hmacsha512_state, key: *const libc::c_uchar, keylen: usize, ) -> libc::c_int819 pub fn crypto_auth_hmacsha512_init(
820 state: *mut crypto_auth_hmacsha512_state,
821 key: *const libc::c_uchar,
822 keylen: usize,
823 ) -> libc::c_int;
824 }
825 extern "C" {
crypto_auth_hmacsha512_update( state: *mut crypto_auth_hmacsha512_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int826 pub fn crypto_auth_hmacsha512_update(
827 state: *mut crypto_auth_hmacsha512_state,
828 in_: *const libc::c_uchar,
829 inlen: libc::c_ulonglong,
830 ) -> libc::c_int;
831 }
832 extern "C" {
crypto_auth_hmacsha512_final( state: *mut crypto_auth_hmacsha512_state, out: *mut libc::c_uchar, ) -> libc::c_int833 pub fn crypto_auth_hmacsha512_final(
834 state: *mut crypto_auth_hmacsha512_state,
835 out: *mut libc::c_uchar,
836 ) -> libc::c_int;
837 }
838 extern "C" {
crypto_auth_hmacsha512_keygen(k: *mut libc::c_uchar)839 pub fn crypto_auth_hmacsha512_keygen(k: *mut libc::c_uchar);
840 }
841 extern "C" {
crypto_auth_hmacsha512256_bytes() -> usize842 pub fn crypto_auth_hmacsha512256_bytes() -> usize;
843 }
844 extern "C" {
crypto_auth_hmacsha512256_keybytes() -> usize845 pub fn crypto_auth_hmacsha512256_keybytes() -> usize;
846 }
847 extern "C" {
crypto_auth_hmacsha512256( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int848 pub fn crypto_auth_hmacsha512256(
849 out: *mut libc::c_uchar,
850 in_: *const libc::c_uchar,
851 inlen: libc::c_ulonglong,
852 k: *const libc::c_uchar,
853 ) -> libc::c_int;
854 }
855 extern "C" {
crypto_auth_hmacsha512256_verify( h: *const libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int856 pub fn crypto_auth_hmacsha512256_verify(
857 h: *const libc::c_uchar,
858 in_: *const libc::c_uchar,
859 inlen: libc::c_ulonglong,
860 k: *const libc::c_uchar,
861 ) -> libc::c_int;
862 }
863 pub type crypto_auth_hmacsha512256_state = crypto_auth_hmacsha512_state;
864 extern "C" {
crypto_auth_hmacsha512256_statebytes() -> usize865 pub fn crypto_auth_hmacsha512256_statebytes() -> usize;
866 }
867 extern "C" {
crypto_auth_hmacsha512256_init( state: *mut crypto_auth_hmacsha512256_state, key: *const libc::c_uchar, keylen: usize, ) -> libc::c_int868 pub fn crypto_auth_hmacsha512256_init(
869 state: *mut crypto_auth_hmacsha512256_state,
870 key: *const libc::c_uchar,
871 keylen: usize,
872 ) -> libc::c_int;
873 }
874 extern "C" {
crypto_auth_hmacsha512256_update( state: *mut crypto_auth_hmacsha512256_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int875 pub fn crypto_auth_hmacsha512256_update(
876 state: *mut crypto_auth_hmacsha512256_state,
877 in_: *const libc::c_uchar,
878 inlen: libc::c_ulonglong,
879 ) -> libc::c_int;
880 }
881 extern "C" {
crypto_auth_hmacsha512256_final( state: *mut crypto_auth_hmacsha512256_state, out: *mut libc::c_uchar, ) -> libc::c_int882 pub fn crypto_auth_hmacsha512256_final(
883 state: *mut crypto_auth_hmacsha512256_state,
884 out: *mut libc::c_uchar,
885 ) -> libc::c_int;
886 }
887 extern "C" {
crypto_auth_hmacsha512256_keygen(k: *mut libc::c_uchar)888 pub fn crypto_auth_hmacsha512256_keygen(k: *mut libc::c_uchar);
889 }
890 extern "C" {
crypto_auth_bytes() -> usize891 pub fn crypto_auth_bytes() -> usize;
892 }
893 extern "C" {
crypto_auth_keybytes() -> usize894 pub fn crypto_auth_keybytes() -> usize;
895 }
896 extern "C" {
crypto_auth_primitive() -> *const libc::c_char897 pub fn crypto_auth_primitive() -> *const libc::c_char;
898 }
899 extern "C" {
crypto_auth( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int900 pub fn crypto_auth(
901 out: *mut libc::c_uchar,
902 in_: *const libc::c_uchar,
903 inlen: libc::c_ulonglong,
904 k: *const libc::c_uchar,
905 ) -> libc::c_int;
906 }
907 extern "C" {
crypto_auth_verify( h: *const libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int908 pub fn crypto_auth_verify(
909 h: *const libc::c_uchar,
910 in_: *const libc::c_uchar,
911 inlen: libc::c_ulonglong,
912 k: *const libc::c_uchar,
913 ) -> libc::c_int;
914 }
915 extern "C" {
crypto_auth_keygen(k: *mut libc::c_uchar)916 pub fn crypto_auth_keygen(k: *mut libc::c_uchar);
917 }
918 #[repr(C)]
919 #[derive(Debug, Copy, Clone)]
920 pub struct crypto_hash_sha256_state {
921 pub state: [u32; 8usize],
922 pub count: u64,
923 pub buf: [u8; 64usize],
924 }
925 #[test]
bindgen_test_layout_crypto_hash_sha256_state()926 fn bindgen_test_layout_crypto_hash_sha256_state() {
927 assert_eq!(
928 ::core::mem::size_of::<crypto_hash_sha256_state>(),
929 104usize,
930 concat!("Size of: ", stringify!(crypto_hash_sha256_state))
931 );
932 assert_eq!(
933 ::core::mem::align_of::<crypto_hash_sha256_state>(),
934 8usize,
935 concat!("Alignment of ", stringify!(crypto_hash_sha256_state))
936 );
937 assert_eq!(
938 unsafe { &(*(::core::ptr::null::<crypto_hash_sha256_state>())).state as *const _ as usize },
939 0usize,
940 concat!(
941 "Offset of field: ",
942 stringify!(crypto_hash_sha256_state),
943 "::",
944 stringify!(state)
945 )
946 );
947 assert_eq!(
948 unsafe { &(*(::core::ptr::null::<crypto_hash_sha256_state>())).count as *const _ as usize },
949 32usize,
950 concat!(
951 "Offset of field: ",
952 stringify!(crypto_hash_sha256_state),
953 "::",
954 stringify!(count)
955 )
956 );
957 assert_eq!(
958 unsafe { &(*(::core::ptr::null::<crypto_hash_sha256_state>())).buf as *const _ as usize },
959 40usize,
960 concat!(
961 "Offset of field: ",
962 stringify!(crypto_hash_sha256_state),
963 "::",
964 stringify!(buf)
965 )
966 );
967 }
968 extern "C" {
crypto_hash_sha256_statebytes() -> usize969 pub fn crypto_hash_sha256_statebytes() -> usize;
970 }
971 extern "C" {
crypto_hash_sha256_bytes() -> usize972 pub fn crypto_hash_sha256_bytes() -> usize;
973 }
974 extern "C" {
crypto_hash_sha256( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int975 pub fn crypto_hash_sha256(
976 out: *mut libc::c_uchar,
977 in_: *const libc::c_uchar,
978 inlen: libc::c_ulonglong,
979 ) -> libc::c_int;
980 }
981 extern "C" {
crypto_hash_sha256_init(state: *mut crypto_hash_sha256_state) -> libc::c_int982 pub fn crypto_hash_sha256_init(state: *mut crypto_hash_sha256_state) -> libc::c_int;
983 }
984 extern "C" {
crypto_hash_sha256_update( state: *mut crypto_hash_sha256_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int985 pub fn crypto_hash_sha256_update(
986 state: *mut crypto_hash_sha256_state,
987 in_: *const libc::c_uchar,
988 inlen: libc::c_ulonglong,
989 ) -> libc::c_int;
990 }
991 extern "C" {
crypto_hash_sha256_final( state: *mut crypto_hash_sha256_state, out: *mut libc::c_uchar, ) -> libc::c_int992 pub fn crypto_hash_sha256_final(
993 state: *mut crypto_hash_sha256_state,
994 out: *mut libc::c_uchar,
995 ) -> libc::c_int;
996 }
997 extern "C" {
crypto_auth_hmacsha256_bytes() -> usize998 pub fn crypto_auth_hmacsha256_bytes() -> usize;
999 }
1000 extern "C" {
crypto_auth_hmacsha256_keybytes() -> usize1001 pub fn crypto_auth_hmacsha256_keybytes() -> usize;
1002 }
1003 extern "C" {
crypto_auth_hmacsha256( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int1004 pub fn crypto_auth_hmacsha256(
1005 out: *mut libc::c_uchar,
1006 in_: *const libc::c_uchar,
1007 inlen: libc::c_ulonglong,
1008 k: *const libc::c_uchar,
1009 ) -> libc::c_int;
1010 }
1011 extern "C" {
crypto_auth_hmacsha256_verify( h: *const libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int1012 pub fn crypto_auth_hmacsha256_verify(
1013 h: *const libc::c_uchar,
1014 in_: *const libc::c_uchar,
1015 inlen: libc::c_ulonglong,
1016 k: *const libc::c_uchar,
1017 ) -> libc::c_int;
1018 }
1019 #[repr(C)]
1020 #[derive(Debug, Copy, Clone)]
1021 pub struct crypto_auth_hmacsha256_state {
1022 pub ictx: crypto_hash_sha256_state,
1023 pub octx: crypto_hash_sha256_state,
1024 }
1025 #[test]
bindgen_test_layout_crypto_auth_hmacsha256_state()1026 fn bindgen_test_layout_crypto_auth_hmacsha256_state() {
1027 assert_eq!(
1028 ::core::mem::size_of::<crypto_auth_hmacsha256_state>(),
1029 208usize,
1030 concat!("Size of: ", stringify!(crypto_auth_hmacsha256_state))
1031 );
1032 assert_eq!(
1033 ::core::mem::align_of::<crypto_auth_hmacsha256_state>(),
1034 8usize,
1035 concat!("Alignment of ", stringify!(crypto_auth_hmacsha256_state))
1036 );
1037 assert_eq!(
1038 unsafe {
1039 &(*(::core::ptr::null::<crypto_auth_hmacsha256_state>())).ictx as *const _ as usize
1040 },
1041 0usize,
1042 concat!(
1043 "Offset of field: ",
1044 stringify!(crypto_auth_hmacsha256_state),
1045 "::",
1046 stringify!(ictx)
1047 )
1048 );
1049 assert_eq!(
1050 unsafe {
1051 &(*(::core::ptr::null::<crypto_auth_hmacsha256_state>())).octx as *const _ as usize
1052 },
1053 104usize,
1054 concat!(
1055 "Offset of field: ",
1056 stringify!(crypto_auth_hmacsha256_state),
1057 "::",
1058 stringify!(octx)
1059 )
1060 );
1061 }
1062 extern "C" {
crypto_auth_hmacsha256_statebytes() -> usize1063 pub fn crypto_auth_hmacsha256_statebytes() -> usize;
1064 }
1065 extern "C" {
crypto_auth_hmacsha256_init( state: *mut crypto_auth_hmacsha256_state, key: *const libc::c_uchar, keylen: usize, ) -> libc::c_int1066 pub fn crypto_auth_hmacsha256_init(
1067 state: *mut crypto_auth_hmacsha256_state,
1068 key: *const libc::c_uchar,
1069 keylen: usize,
1070 ) -> libc::c_int;
1071 }
1072 extern "C" {
crypto_auth_hmacsha256_update( state: *mut crypto_auth_hmacsha256_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1073 pub fn crypto_auth_hmacsha256_update(
1074 state: *mut crypto_auth_hmacsha256_state,
1075 in_: *const libc::c_uchar,
1076 inlen: libc::c_ulonglong,
1077 ) -> libc::c_int;
1078 }
1079 extern "C" {
crypto_auth_hmacsha256_final( state: *mut crypto_auth_hmacsha256_state, out: *mut libc::c_uchar, ) -> libc::c_int1080 pub fn crypto_auth_hmacsha256_final(
1081 state: *mut crypto_auth_hmacsha256_state,
1082 out: *mut libc::c_uchar,
1083 ) -> libc::c_int;
1084 }
1085 extern "C" {
crypto_auth_hmacsha256_keygen(k: *mut libc::c_uchar)1086 pub fn crypto_auth_hmacsha256_keygen(k: *mut libc::c_uchar);
1087 }
1088 extern "C" {
crypto_stream_xsalsa20_keybytes() -> usize1089 pub fn crypto_stream_xsalsa20_keybytes() -> usize;
1090 }
1091 extern "C" {
crypto_stream_xsalsa20_noncebytes() -> usize1092 pub fn crypto_stream_xsalsa20_noncebytes() -> usize;
1093 }
1094 extern "C" {
crypto_stream_xsalsa20_messagebytes_max() -> usize1095 pub fn crypto_stream_xsalsa20_messagebytes_max() -> usize;
1096 }
1097 extern "C" {
crypto_stream_xsalsa20( c: *mut libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1098 pub fn crypto_stream_xsalsa20(
1099 c: *mut libc::c_uchar,
1100 clen: libc::c_ulonglong,
1101 n: *const libc::c_uchar,
1102 k: *const libc::c_uchar,
1103 ) -> libc::c_int;
1104 }
1105 extern "C" {
crypto_stream_xsalsa20_xor( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1106 pub fn crypto_stream_xsalsa20_xor(
1107 c: *mut libc::c_uchar,
1108 m: *const libc::c_uchar,
1109 mlen: libc::c_ulonglong,
1110 n: *const libc::c_uchar,
1111 k: *const libc::c_uchar,
1112 ) -> libc::c_int;
1113 }
1114 extern "C" {
crypto_stream_xsalsa20_xor_ic( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, ic: u64, k: *const libc::c_uchar, ) -> libc::c_int1115 pub fn crypto_stream_xsalsa20_xor_ic(
1116 c: *mut libc::c_uchar,
1117 m: *const libc::c_uchar,
1118 mlen: libc::c_ulonglong,
1119 n: *const libc::c_uchar,
1120 ic: u64,
1121 k: *const libc::c_uchar,
1122 ) -> libc::c_int;
1123 }
1124 extern "C" {
crypto_stream_xsalsa20_keygen(k: *mut libc::c_uchar)1125 pub fn crypto_stream_xsalsa20_keygen(k: *mut libc::c_uchar);
1126 }
1127 extern "C" {
crypto_box_curve25519xsalsa20poly1305_seedbytes() -> usize1128 pub fn crypto_box_curve25519xsalsa20poly1305_seedbytes() -> usize;
1129 }
1130 extern "C" {
crypto_box_curve25519xsalsa20poly1305_publickeybytes() -> usize1131 pub fn crypto_box_curve25519xsalsa20poly1305_publickeybytes() -> usize;
1132 }
1133 extern "C" {
crypto_box_curve25519xsalsa20poly1305_secretkeybytes() -> usize1134 pub fn crypto_box_curve25519xsalsa20poly1305_secretkeybytes() -> usize;
1135 }
1136 extern "C" {
crypto_box_curve25519xsalsa20poly1305_beforenmbytes() -> usize1137 pub fn crypto_box_curve25519xsalsa20poly1305_beforenmbytes() -> usize;
1138 }
1139 extern "C" {
crypto_box_curve25519xsalsa20poly1305_noncebytes() -> usize1140 pub fn crypto_box_curve25519xsalsa20poly1305_noncebytes() -> usize;
1141 }
1142 extern "C" {
crypto_box_curve25519xsalsa20poly1305_macbytes() -> usize1143 pub fn crypto_box_curve25519xsalsa20poly1305_macbytes() -> usize;
1144 }
1145 extern "C" {
crypto_box_curve25519xsalsa20poly1305_messagebytes_max() -> usize1146 pub fn crypto_box_curve25519xsalsa20poly1305_messagebytes_max() -> usize;
1147 }
1148 extern "C" {
crypto_box_curve25519xsalsa20poly1305_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int1149 pub fn crypto_box_curve25519xsalsa20poly1305_seed_keypair(
1150 pk: *mut libc::c_uchar,
1151 sk: *mut libc::c_uchar,
1152 seed: *const libc::c_uchar,
1153 ) -> libc::c_int;
1154 }
1155 extern "C" {
crypto_box_curve25519xsalsa20poly1305_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, ) -> libc::c_int1156 pub fn crypto_box_curve25519xsalsa20poly1305_keypair(
1157 pk: *mut libc::c_uchar,
1158 sk: *mut libc::c_uchar,
1159 ) -> libc::c_int;
1160 }
1161 extern "C" {
crypto_box_curve25519xsalsa20poly1305_beforenm( k: *mut libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1162 pub fn crypto_box_curve25519xsalsa20poly1305_beforenm(
1163 k: *mut libc::c_uchar,
1164 pk: *const libc::c_uchar,
1165 sk: *const libc::c_uchar,
1166 ) -> libc::c_int;
1167 }
1168 extern "C" {
crypto_box_curve25519xsalsa20poly1305_boxzerobytes() -> usize1169 pub fn crypto_box_curve25519xsalsa20poly1305_boxzerobytes() -> usize;
1170 }
1171 extern "C" {
crypto_box_curve25519xsalsa20poly1305_zerobytes() -> usize1172 pub fn crypto_box_curve25519xsalsa20poly1305_zerobytes() -> usize;
1173 }
1174 extern "C" {
crypto_box_curve25519xsalsa20poly1305( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1175 pub fn crypto_box_curve25519xsalsa20poly1305(
1176 c: *mut libc::c_uchar,
1177 m: *const libc::c_uchar,
1178 mlen: libc::c_ulonglong,
1179 n: *const libc::c_uchar,
1180 pk: *const libc::c_uchar,
1181 sk: *const libc::c_uchar,
1182 ) -> libc::c_int;
1183 }
1184 extern "C" {
crypto_box_curve25519xsalsa20poly1305_open( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1185 pub fn crypto_box_curve25519xsalsa20poly1305_open(
1186 m: *mut libc::c_uchar,
1187 c: *const libc::c_uchar,
1188 clen: libc::c_ulonglong,
1189 n: *const libc::c_uchar,
1190 pk: *const libc::c_uchar,
1191 sk: *const libc::c_uchar,
1192 ) -> libc::c_int;
1193 }
1194 extern "C" {
crypto_box_curve25519xsalsa20poly1305_afternm( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1195 pub fn crypto_box_curve25519xsalsa20poly1305_afternm(
1196 c: *mut libc::c_uchar,
1197 m: *const libc::c_uchar,
1198 mlen: libc::c_ulonglong,
1199 n: *const libc::c_uchar,
1200 k: *const libc::c_uchar,
1201 ) -> libc::c_int;
1202 }
1203 extern "C" {
crypto_box_curve25519xsalsa20poly1305_open_afternm( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1204 pub fn crypto_box_curve25519xsalsa20poly1305_open_afternm(
1205 m: *mut libc::c_uchar,
1206 c: *const libc::c_uchar,
1207 clen: libc::c_ulonglong,
1208 n: *const libc::c_uchar,
1209 k: *const libc::c_uchar,
1210 ) -> libc::c_int;
1211 }
1212 extern "C" {
crypto_box_seedbytes() -> usize1213 pub fn crypto_box_seedbytes() -> usize;
1214 }
1215 extern "C" {
crypto_box_publickeybytes() -> usize1216 pub fn crypto_box_publickeybytes() -> usize;
1217 }
1218 extern "C" {
crypto_box_secretkeybytes() -> usize1219 pub fn crypto_box_secretkeybytes() -> usize;
1220 }
1221 extern "C" {
crypto_box_noncebytes() -> usize1222 pub fn crypto_box_noncebytes() -> usize;
1223 }
1224 extern "C" {
crypto_box_macbytes() -> usize1225 pub fn crypto_box_macbytes() -> usize;
1226 }
1227 extern "C" {
crypto_box_messagebytes_max() -> usize1228 pub fn crypto_box_messagebytes_max() -> usize;
1229 }
1230 extern "C" {
crypto_box_primitive() -> *const libc::c_char1231 pub fn crypto_box_primitive() -> *const libc::c_char;
1232 }
1233 extern "C" {
crypto_box_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int1234 pub fn crypto_box_seed_keypair(
1235 pk: *mut libc::c_uchar,
1236 sk: *mut libc::c_uchar,
1237 seed: *const libc::c_uchar,
1238 ) -> libc::c_int;
1239 }
1240 extern "C" {
crypto_box_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int1241 pub fn crypto_box_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int;
1242 }
1243 extern "C" {
crypto_box_easy( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1244 pub fn crypto_box_easy(
1245 c: *mut libc::c_uchar,
1246 m: *const libc::c_uchar,
1247 mlen: libc::c_ulonglong,
1248 n: *const libc::c_uchar,
1249 pk: *const libc::c_uchar,
1250 sk: *const libc::c_uchar,
1251 ) -> libc::c_int;
1252 }
1253 extern "C" {
crypto_box_open_easy( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1254 pub fn crypto_box_open_easy(
1255 m: *mut libc::c_uchar,
1256 c: *const libc::c_uchar,
1257 clen: libc::c_ulonglong,
1258 n: *const libc::c_uchar,
1259 pk: *const libc::c_uchar,
1260 sk: *const libc::c_uchar,
1261 ) -> libc::c_int;
1262 }
1263 extern "C" {
crypto_box_detached( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1264 pub fn crypto_box_detached(
1265 c: *mut libc::c_uchar,
1266 mac: *mut libc::c_uchar,
1267 m: *const libc::c_uchar,
1268 mlen: libc::c_ulonglong,
1269 n: *const libc::c_uchar,
1270 pk: *const libc::c_uchar,
1271 sk: *const libc::c_uchar,
1272 ) -> libc::c_int;
1273 }
1274 extern "C" {
crypto_box_open_detached( m: *mut libc::c_uchar, c: *const libc::c_uchar, mac: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1275 pub fn crypto_box_open_detached(
1276 m: *mut libc::c_uchar,
1277 c: *const libc::c_uchar,
1278 mac: *const libc::c_uchar,
1279 clen: libc::c_ulonglong,
1280 n: *const libc::c_uchar,
1281 pk: *const libc::c_uchar,
1282 sk: *const libc::c_uchar,
1283 ) -> libc::c_int;
1284 }
1285 extern "C" {
crypto_box_beforenmbytes() -> usize1286 pub fn crypto_box_beforenmbytes() -> usize;
1287 }
1288 extern "C" {
crypto_box_beforenm( k: *mut libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1289 pub fn crypto_box_beforenm(
1290 k: *mut libc::c_uchar,
1291 pk: *const libc::c_uchar,
1292 sk: *const libc::c_uchar,
1293 ) -> libc::c_int;
1294 }
1295 extern "C" {
crypto_box_easy_afternm( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1296 pub fn crypto_box_easy_afternm(
1297 c: *mut libc::c_uchar,
1298 m: *const libc::c_uchar,
1299 mlen: libc::c_ulonglong,
1300 n: *const libc::c_uchar,
1301 k: *const libc::c_uchar,
1302 ) -> libc::c_int;
1303 }
1304 extern "C" {
crypto_box_open_easy_afternm( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1305 pub fn crypto_box_open_easy_afternm(
1306 m: *mut libc::c_uchar,
1307 c: *const libc::c_uchar,
1308 clen: libc::c_ulonglong,
1309 n: *const libc::c_uchar,
1310 k: *const libc::c_uchar,
1311 ) -> libc::c_int;
1312 }
1313 extern "C" {
crypto_box_detached_afternm( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1314 pub fn crypto_box_detached_afternm(
1315 c: *mut libc::c_uchar,
1316 mac: *mut libc::c_uchar,
1317 m: *const libc::c_uchar,
1318 mlen: libc::c_ulonglong,
1319 n: *const libc::c_uchar,
1320 k: *const libc::c_uchar,
1321 ) -> libc::c_int;
1322 }
1323 extern "C" {
crypto_box_open_detached_afternm( m: *mut libc::c_uchar, c: *const libc::c_uchar, mac: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1324 pub fn crypto_box_open_detached_afternm(
1325 m: *mut libc::c_uchar,
1326 c: *const libc::c_uchar,
1327 mac: *const libc::c_uchar,
1328 clen: libc::c_ulonglong,
1329 n: *const libc::c_uchar,
1330 k: *const libc::c_uchar,
1331 ) -> libc::c_int;
1332 }
1333 extern "C" {
crypto_box_sealbytes() -> usize1334 pub fn crypto_box_sealbytes() -> usize;
1335 }
1336 extern "C" {
crypto_box_seal( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, pk: *const libc::c_uchar, ) -> libc::c_int1337 pub fn crypto_box_seal(
1338 c: *mut libc::c_uchar,
1339 m: *const libc::c_uchar,
1340 mlen: libc::c_ulonglong,
1341 pk: *const libc::c_uchar,
1342 ) -> libc::c_int;
1343 }
1344 extern "C" {
crypto_box_seal_open( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1345 pub fn crypto_box_seal_open(
1346 m: *mut libc::c_uchar,
1347 c: *const libc::c_uchar,
1348 clen: libc::c_ulonglong,
1349 pk: *const libc::c_uchar,
1350 sk: *const libc::c_uchar,
1351 ) -> libc::c_int;
1352 }
1353 extern "C" {
crypto_box_zerobytes() -> usize1354 pub fn crypto_box_zerobytes() -> usize;
1355 }
1356 extern "C" {
crypto_box_boxzerobytes() -> usize1357 pub fn crypto_box_boxzerobytes() -> usize;
1358 }
1359 extern "C" {
crypto_box( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1360 pub fn crypto_box(
1361 c: *mut libc::c_uchar,
1362 m: *const libc::c_uchar,
1363 mlen: libc::c_ulonglong,
1364 n: *const libc::c_uchar,
1365 pk: *const libc::c_uchar,
1366 sk: *const libc::c_uchar,
1367 ) -> libc::c_int;
1368 }
1369 extern "C" {
crypto_box_open( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1370 pub fn crypto_box_open(
1371 m: *mut libc::c_uchar,
1372 c: *const libc::c_uchar,
1373 clen: libc::c_ulonglong,
1374 n: *const libc::c_uchar,
1375 pk: *const libc::c_uchar,
1376 sk: *const libc::c_uchar,
1377 ) -> libc::c_int;
1378 }
1379 extern "C" {
crypto_box_afternm( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1380 pub fn crypto_box_afternm(
1381 c: *mut libc::c_uchar,
1382 m: *const libc::c_uchar,
1383 mlen: libc::c_ulonglong,
1384 n: *const libc::c_uchar,
1385 k: *const libc::c_uchar,
1386 ) -> libc::c_int;
1387 }
1388 extern "C" {
crypto_box_open_afternm( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int1389 pub fn crypto_box_open_afternm(
1390 m: *mut libc::c_uchar,
1391 c: *const libc::c_uchar,
1392 clen: libc::c_ulonglong,
1393 n: *const libc::c_uchar,
1394 k: *const libc::c_uchar,
1395 ) -> libc::c_int;
1396 }
1397 extern "C" {
crypto_core_hsalsa20_outputbytes() -> usize1398 pub fn crypto_core_hsalsa20_outputbytes() -> usize;
1399 }
1400 extern "C" {
crypto_core_hsalsa20_inputbytes() -> usize1401 pub fn crypto_core_hsalsa20_inputbytes() -> usize;
1402 }
1403 extern "C" {
crypto_core_hsalsa20_keybytes() -> usize1404 pub fn crypto_core_hsalsa20_keybytes() -> usize;
1405 }
1406 extern "C" {
crypto_core_hsalsa20_constbytes() -> usize1407 pub fn crypto_core_hsalsa20_constbytes() -> usize;
1408 }
1409 extern "C" {
crypto_core_hsalsa20( out: *mut libc::c_uchar, in_: *const libc::c_uchar, k: *const libc::c_uchar, c: *const libc::c_uchar, ) -> libc::c_int1410 pub fn crypto_core_hsalsa20(
1411 out: *mut libc::c_uchar,
1412 in_: *const libc::c_uchar,
1413 k: *const libc::c_uchar,
1414 c: *const libc::c_uchar,
1415 ) -> libc::c_int;
1416 }
1417 extern "C" {
crypto_core_hchacha20_outputbytes() -> usize1418 pub fn crypto_core_hchacha20_outputbytes() -> usize;
1419 }
1420 extern "C" {
crypto_core_hchacha20_inputbytes() -> usize1421 pub fn crypto_core_hchacha20_inputbytes() -> usize;
1422 }
1423 extern "C" {
crypto_core_hchacha20_keybytes() -> usize1424 pub fn crypto_core_hchacha20_keybytes() -> usize;
1425 }
1426 extern "C" {
crypto_core_hchacha20_constbytes() -> usize1427 pub fn crypto_core_hchacha20_constbytes() -> usize;
1428 }
1429 extern "C" {
crypto_core_hchacha20( out: *mut libc::c_uchar, in_: *const libc::c_uchar, k: *const libc::c_uchar, c: *const libc::c_uchar, ) -> libc::c_int1430 pub fn crypto_core_hchacha20(
1431 out: *mut libc::c_uchar,
1432 in_: *const libc::c_uchar,
1433 k: *const libc::c_uchar,
1434 c: *const libc::c_uchar,
1435 ) -> libc::c_int;
1436 }
1437 extern "C" {
crypto_core_salsa20_outputbytes() -> usize1438 pub fn crypto_core_salsa20_outputbytes() -> usize;
1439 }
1440 extern "C" {
crypto_core_salsa20_inputbytes() -> usize1441 pub fn crypto_core_salsa20_inputbytes() -> usize;
1442 }
1443 extern "C" {
crypto_core_salsa20_keybytes() -> usize1444 pub fn crypto_core_salsa20_keybytes() -> usize;
1445 }
1446 extern "C" {
crypto_core_salsa20_constbytes() -> usize1447 pub fn crypto_core_salsa20_constbytes() -> usize;
1448 }
1449 extern "C" {
crypto_core_salsa20( out: *mut libc::c_uchar, in_: *const libc::c_uchar, k: *const libc::c_uchar, c: *const libc::c_uchar, ) -> libc::c_int1450 pub fn crypto_core_salsa20(
1451 out: *mut libc::c_uchar,
1452 in_: *const libc::c_uchar,
1453 k: *const libc::c_uchar,
1454 c: *const libc::c_uchar,
1455 ) -> libc::c_int;
1456 }
1457 extern "C" {
crypto_core_salsa2012_outputbytes() -> usize1458 pub fn crypto_core_salsa2012_outputbytes() -> usize;
1459 }
1460 extern "C" {
crypto_core_salsa2012_inputbytes() -> usize1461 pub fn crypto_core_salsa2012_inputbytes() -> usize;
1462 }
1463 extern "C" {
crypto_core_salsa2012_keybytes() -> usize1464 pub fn crypto_core_salsa2012_keybytes() -> usize;
1465 }
1466 extern "C" {
crypto_core_salsa2012_constbytes() -> usize1467 pub fn crypto_core_salsa2012_constbytes() -> usize;
1468 }
1469 extern "C" {
crypto_core_salsa2012( out: *mut libc::c_uchar, in_: *const libc::c_uchar, k: *const libc::c_uchar, c: *const libc::c_uchar, ) -> libc::c_int1470 pub fn crypto_core_salsa2012(
1471 out: *mut libc::c_uchar,
1472 in_: *const libc::c_uchar,
1473 k: *const libc::c_uchar,
1474 c: *const libc::c_uchar,
1475 ) -> libc::c_int;
1476 }
1477 extern "C" {
crypto_core_salsa208_outputbytes() -> usize1478 pub fn crypto_core_salsa208_outputbytes() -> usize;
1479 }
1480 extern "C" {
crypto_core_salsa208_inputbytes() -> usize1481 pub fn crypto_core_salsa208_inputbytes() -> usize;
1482 }
1483 extern "C" {
crypto_core_salsa208_keybytes() -> usize1484 pub fn crypto_core_salsa208_keybytes() -> usize;
1485 }
1486 extern "C" {
crypto_core_salsa208_constbytes() -> usize1487 pub fn crypto_core_salsa208_constbytes() -> usize;
1488 }
1489 extern "C" {
crypto_core_salsa208( out: *mut libc::c_uchar, in_: *const libc::c_uchar, k: *const libc::c_uchar, c: *const libc::c_uchar, ) -> libc::c_int1490 pub fn crypto_core_salsa208(
1491 out: *mut libc::c_uchar,
1492 in_: *const libc::c_uchar,
1493 k: *const libc::c_uchar,
1494 c: *const libc::c_uchar,
1495 ) -> libc::c_int;
1496 }
1497 #[repr(C)]
1498 #[repr(align(64))]
1499 #[derive(Debug, Copy, Clone)]
1500 pub struct crypto_generichash_blake2b_state {
1501 pub opaque: [libc::c_uchar; 384usize],
1502 }
1503 #[test]
bindgen_test_layout_crypto_generichash_blake2b_state()1504 fn bindgen_test_layout_crypto_generichash_blake2b_state() {
1505 assert_eq!(
1506 ::core::mem::size_of::<crypto_generichash_blake2b_state>(),
1507 384usize,
1508 concat!("Size of: ", stringify!(crypto_generichash_blake2b_state))
1509 );
1510 assert_eq!(
1511 ::core::mem::align_of::<crypto_generichash_blake2b_state>(),
1512 64usize,
1513 concat!(
1514 "Alignment of ",
1515 stringify!(crypto_generichash_blake2b_state)
1516 )
1517 );
1518 assert_eq!(
1519 unsafe {
1520 &(*(::core::ptr::null::<crypto_generichash_blake2b_state>())).opaque as *const _
1521 as usize
1522 },
1523 0usize,
1524 concat!(
1525 "Offset of field: ",
1526 stringify!(crypto_generichash_blake2b_state),
1527 "::",
1528 stringify!(opaque)
1529 )
1530 );
1531 }
1532 extern "C" {
crypto_generichash_blake2b_bytes_min() -> usize1533 pub fn crypto_generichash_blake2b_bytes_min() -> usize;
1534 }
1535 extern "C" {
crypto_generichash_blake2b_bytes_max() -> usize1536 pub fn crypto_generichash_blake2b_bytes_max() -> usize;
1537 }
1538 extern "C" {
crypto_generichash_blake2b_bytes() -> usize1539 pub fn crypto_generichash_blake2b_bytes() -> usize;
1540 }
1541 extern "C" {
crypto_generichash_blake2b_keybytes_min() -> usize1542 pub fn crypto_generichash_blake2b_keybytes_min() -> usize;
1543 }
1544 extern "C" {
crypto_generichash_blake2b_keybytes_max() -> usize1545 pub fn crypto_generichash_blake2b_keybytes_max() -> usize;
1546 }
1547 extern "C" {
crypto_generichash_blake2b_keybytes() -> usize1548 pub fn crypto_generichash_blake2b_keybytes() -> usize;
1549 }
1550 extern "C" {
crypto_generichash_blake2b_saltbytes() -> usize1551 pub fn crypto_generichash_blake2b_saltbytes() -> usize;
1552 }
1553 extern "C" {
crypto_generichash_blake2b_personalbytes() -> usize1554 pub fn crypto_generichash_blake2b_personalbytes() -> usize;
1555 }
1556 extern "C" {
crypto_generichash_blake2b_statebytes() -> usize1557 pub fn crypto_generichash_blake2b_statebytes() -> usize;
1558 }
1559 extern "C" {
crypto_generichash_blake2b( out: *mut libc::c_uchar, outlen: usize, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, key: *const libc::c_uchar, keylen: usize, ) -> libc::c_int1560 pub fn crypto_generichash_blake2b(
1561 out: *mut libc::c_uchar,
1562 outlen: usize,
1563 in_: *const libc::c_uchar,
1564 inlen: libc::c_ulonglong,
1565 key: *const libc::c_uchar,
1566 keylen: usize,
1567 ) -> libc::c_int;
1568 }
1569 extern "C" {
crypto_generichash_blake2b_salt_personal( out: *mut libc::c_uchar, outlen: usize, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, key: *const libc::c_uchar, keylen: usize, salt: *const libc::c_uchar, personal: *const libc::c_uchar, ) -> libc::c_int1570 pub fn crypto_generichash_blake2b_salt_personal(
1571 out: *mut libc::c_uchar,
1572 outlen: usize,
1573 in_: *const libc::c_uchar,
1574 inlen: libc::c_ulonglong,
1575 key: *const libc::c_uchar,
1576 keylen: usize,
1577 salt: *const libc::c_uchar,
1578 personal: *const libc::c_uchar,
1579 ) -> libc::c_int;
1580 }
1581 extern "C" {
crypto_generichash_blake2b_init( state: *mut crypto_generichash_blake2b_state, key: *const libc::c_uchar, keylen: usize, outlen: usize, ) -> libc::c_int1582 pub fn crypto_generichash_blake2b_init(
1583 state: *mut crypto_generichash_blake2b_state,
1584 key: *const libc::c_uchar,
1585 keylen: usize,
1586 outlen: usize,
1587 ) -> libc::c_int;
1588 }
1589 extern "C" {
crypto_generichash_blake2b_init_salt_personal( state: *mut crypto_generichash_blake2b_state, key: *const libc::c_uchar, keylen: usize, outlen: usize, salt: *const libc::c_uchar, personal: *const libc::c_uchar, ) -> libc::c_int1590 pub fn crypto_generichash_blake2b_init_salt_personal(
1591 state: *mut crypto_generichash_blake2b_state,
1592 key: *const libc::c_uchar,
1593 keylen: usize,
1594 outlen: usize,
1595 salt: *const libc::c_uchar,
1596 personal: *const libc::c_uchar,
1597 ) -> libc::c_int;
1598 }
1599 extern "C" {
crypto_generichash_blake2b_update( state: *mut crypto_generichash_blake2b_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1600 pub fn crypto_generichash_blake2b_update(
1601 state: *mut crypto_generichash_blake2b_state,
1602 in_: *const libc::c_uchar,
1603 inlen: libc::c_ulonglong,
1604 ) -> libc::c_int;
1605 }
1606 extern "C" {
crypto_generichash_blake2b_final( state: *mut crypto_generichash_blake2b_state, out: *mut libc::c_uchar, outlen: usize, ) -> libc::c_int1607 pub fn crypto_generichash_blake2b_final(
1608 state: *mut crypto_generichash_blake2b_state,
1609 out: *mut libc::c_uchar,
1610 outlen: usize,
1611 ) -> libc::c_int;
1612 }
1613 extern "C" {
crypto_generichash_blake2b_keygen(k: *mut libc::c_uchar)1614 pub fn crypto_generichash_blake2b_keygen(k: *mut libc::c_uchar);
1615 }
1616 extern "C" {
crypto_generichash_bytes_min() -> usize1617 pub fn crypto_generichash_bytes_min() -> usize;
1618 }
1619 extern "C" {
crypto_generichash_bytes_max() -> usize1620 pub fn crypto_generichash_bytes_max() -> usize;
1621 }
1622 extern "C" {
crypto_generichash_bytes() -> usize1623 pub fn crypto_generichash_bytes() -> usize;
1624 }
1625 extern "C" {
crypto_generichash_keybytes_min() -> usize1626 pub fn crypto_generichash_keybytes_min() -> usize;
1627 }
1628 extern "C" {
crypto_generichash_keybytes_max() -> usize1629 pub fn crypto_generichash_keybytes_max() -> usize;
1630 }
1631 extern "C" {
crypto_generichash_keybytes() -> usize1632 pub fn crypto_generichash_keybytes() -> usize;
1633 }
1634 extern "C" {
crypto_generichash_primitive() -> *const libc::c_char1635 pub fn crypto_generichash_primitive() -> *const libc::c_char;
1636 }
1637 pub type crypto_generichash_state = crypto_generichash_blake2b_state;
1638 extern "C" {
crypto_generichash_statebytes() -> usize1639 pub fn crypto_generichash_statebytes() -> usize;
1640 }
1641 extern "C" {
crypto_generichash( out: *mut libc::c_uchar, outlen: usize, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, key: *const libc::c_uchar, keylen: usize, ) -> libc::c_int1642 pub fn crypto_generichash(
1643 out: *mut libc::c_uchar,
1644 outlen: usize,
1645 in_: *const libc::c_uchar,
1646 inlen: libc::c_ulonglong,
1647 key: *const libc::c_uchar,
1648 keylen: usize,
1649 ) -> libc::c_int;
1650 }
1651 extern "C" {
crypto_generichash_init( state: *mut crypto_generichash_state, key: *const libc::c_uchar, keylen: usize, outlen: usize, ) -> libc::c_int1652 pub fn crypto_generichash_init(
1653 state: *mut crypto_generichash_state,
1654 key: *const libc::c_uchar,
1655 keylen: usize,
1656 outlen: usize,
1657 ) -> libc::c_int;
1658 }
1659 extern "C" {
crypto_generichash_update( state: *mut crypto_generichash_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1660 pub fn crypto_generichash_update(
1661 state: *mut crypto_generichash_state,
1662 in_: *const libc::c_uchar,
1663 inlen: libc::c_ulonglong,
1664 ) -> libc::c_int;
1665 }
1666 extern "C" {
crypto_generichash_final( state: *mut crypto_generichash_state, out: *mut libc::c_uchar, outlen: usize, ) -> libc::c_int1667 pub fn crypto_generichash_final(
1668 state: *mut crypto_generichash_state,
1669 out: *mut libc::c_uchar,
1670 outlen: usize,
1671 ) -> libc::c_int;
1672 }
1673 extern "C" {
crypto_generichash_keygen(k: *mut libc::c_uchar)1674 pub fn crypto_generichash_keygen(k: *mut libc::c_uchar);
1675 }
1676 extern "C" {
crypto_hash_bytes() -> usize1677 pub fn crypto_hash_bytes() -> usize;
1678 }
1679 extern "C" {
crypto_hash( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1680 pub fn crypto_hash(
1681 out: *mut libc::c_uchar,
1682 in_: *const libc::c_uchar,
1683 inlen: libc::c_ulonglong,
1684 ) -> libc::c_int;
1685 }
1686 extern "C" {
crypto_hash_primitive() -> *const libc::c_char1687 pub fn crypto_hash_primitive() -> *const libc::c_char;
1688 }
1689 extern "C" {
crypto_kdf_blake2b_bytes_min() -> usize1690 pub fn crypto_kdf_blake2b_bytes_min() -> usize;
1691 }
1692 extern "C" {
crypto_kdf_blake2b_bytes_max() -> usize1693 pub fn crypto_kdf_blake2b_bytes_max() -> usize;
1694 }
1695 extern "C" {
crypto_kdf_blake2b_contextbytes() -> usize1696 pub fn crypto_kdf_blake2b_contextbytes() -> usize;
1697 }
1698 extern "C" {
crypto_kdf_blake2b_keybytes() -> usize1699 pub fn crypto_kdf_blake2b_keybytes() -> usize;
1700 }
1701 extern "C" {
crypto_kdf_blake2b_derive_from_key( subkey: *mut libc::c_uchar, subkey_len: usize, subkey_id: u64, ctx: *const libc::c_char, key: *const libc::c_uchar, ) -> libc::c_int1702 pub fn crypto_kdf_blake2b_derive_from_key(
1703 subkey: *mut libc::c_uchar,
1704 subkey_len: usize,
1705 subkey_id: u64,
1706 ctx: *const libc::c_char,
1707 key: *const libc::c_uchar,
1708 ) -> libc::c_int;
1709 }
1710 extern "C" {
crypto_kdf_bytes_min() -> usize1711 pub fn crypto_kdf_bytes_min() -> usize;
1712 }
1713 extern "C" {
crypto_kdf_bytes_max() -> usize1714 pub fn crypto_kdf_bytes_max() -> usize;
1715 }
1716 extern "C" {
crypto_kdf_contextbytes() -> usize1717 pub fn crypto_kdf_contextbytes() -> usize;
1718 }
1719 extern "C" {
crypto_kdf_keybytes() -> usize1720 pub fn crypto_kdf_keybytes() -> usize;
1721 }
1722 extern "C" {
crypto_kdf_primitive() -> *const libc::c_char1723 pub fn crypto_kdf_primitive() -> *const libc::c_char;
1724 }
1725 extern "C" {
crypto_kdf_derive_from_key( subkey: *mut libc::c_uchar, subkey_len: usize, subkey_id: u64, ctx: *const libc::c_char, key: *const libc::c_uchar, ) -> libc::c_int1726 pub fn crypto_kdf_derive_from_key(
1727 subkey: *mut libc::c_uchar,
1728 subkey_len: usize,
1729 subkey_id: u64,
1730 ctx: *const libc::c_char,
1731 key: *const libc::c_uchar,
1732 ) -> libc::c_int;
1733 }
1734 extern "C" {
crypto_kdf_keygen(k: *mut libc::c_uchar)1735 pub fn crypto_kdf_keygen(k: *mut libc::c_uchar);
1736 }
1737 extern "C" {
crypto_kx_publickeybytes() -> usize1738 pub fn crypto_kx_publickeybytes() -> usize;
1739 }
1740 extern "C" {
crypto_kx_secretkeybytes() -> usize1741 pub fn crypto_kx_secretkeybytes() -> usize;
1742 }
1743 extern "C" {
crypto_kx_seedbytes() -> usize1744 pub fn crypto_kx_seedbytes() -> usize;
1745 }
1746 extern "C" {
crypto_kx_sessionkeybytes() -> usize1747 pub fn crypto_kx_sessionkeybytes() -> usize;
1748 }
1749 extern "C" {
crypto_kx_primitive() -> *const libc::c_char1750 pub fn crypto_kx_primitive() -> *const libc::c_char;
1751 }
1752 extern "C" {
crypto_kx_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int1753 pub fn crypto_kx_seed_keypair(
1754 pk: *mut libc::c_uchar,
1755 sk: *mut libc::c_uchar,
1756 seed: *const libc::c_uchar,
1757 ) -> libc::c_int;
1758 }
1759 extern "C" {
crypto_kx_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int1760 pub fn crypto_kx_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int;
1761 }
1762 extern "C" {
crypto_kx_client_session_keys( rx: *mut libc::c_uchar, tx: *mut libc::c_uchar, client_pk: *const libc::c_uchar, client_sk: *const libc::c_uchar, server_pk: *const libc::c_uchar, ) -> libc::c_int1763 pub fn crypto_kx_client_session_keys(
1764 rx: *mut libc::c_uchar,
1765 tx: *mut libc::c_uchar,
1766 client_pk: *const libc::c_uchar,
1767 client_sk: *const libc::c_uchar,
1768 server_pk: *const libc::c_uchar,
1769 ) -> libc::c_int;
1770 }
1771 extern "C" {
crypto_kx_server_session_keys( rx: *mut libc::c_uchar, tx: *mut libc::c_uchar, server_pk: *const libc::c_uchar, server_sk: *const libc::c_uchar, client_pk: *const libc::c_uchar, ) -> libc::c_int1772 pub fn crypto_kx_server_session_keys(
1773 rx: *mut libc::c_uchar,
1774 tx: *mut libc::c_uchar,
1775 server_pk: *const libc::c_uchar,
1776 server_sk: *const libc::c_uchar,
1777 client_pk: *const libc::c_uchar,
1778 ) -> libc::c_int;
1779 }
1780 #[repr(C)]
1781 #[repr(align(16))]
1782 #[derive(Debug, Copy, Clone)]
1783 pub struct crypto_onetimeauth_poly1305_state {
1784 pub opaque: [libc::c_uchar; 256usize],
1785 }
1786 #[test]
bindgen_test_layout_crypto_onetimeauth_poly1305_state()1787 fn bindgen_test_layout_crypto_onetimeauth_poly1305_state() {
1788 assert_eq!(
1789 ::core::mem::size_of::<crypto_onetimeauth_poly1305_state>(),
1790 256usize,
1791 concat!("Size of: ", stringify!(crypto_onetimeauth_poly1305_state))
1792 );
1793 assert_eq!(
1794 ::core::mem::align_of::<crypto_onetimeauth_poly1305_state>(),
1795 16usize,
1796 concat!(
1797 "Alignment of ",
1798 stringify!(crypto_onetimeauth_poly1305_state)
1799 )
1800 );
1801 assert_eq!(
1802 unsafe {
1803 &(*(::core::ptr::null::<crypto_onetimeauth_poly1305_state>())).opaque as *const _
1804 as usize
1805 },
1806 0usize,
1807 concat!(
1808 "Offset of field: ",
1809 stringify!(crypto_onetimeauth_poly1305_state),
1810 "::",
1811 stringify!(opaque)
1812 )
1813 );
1814 }
1815 extern "C" {
crypto_onetimeauth_poly1305_statebytes() -> usize1816 pub fn crypto_onetimeauth_poly1305_statebytes() -> usize;
1817 }
1818 extern "C" {
crypto_onetimeauth_poly1305_bytes() -> usize1819 pub fn crypto_onetimeauth_poly1305_bytes() -> usize;
1820 }
1821 extern "C" {
crypto_onetimeauth_poly1305_keybytes() -> usize1822 pub fn crypto_onetimeauth_poly1305_keybytes() -> usize;
1823 }
1824 extern "C" {
crypto_onetimeauth_poly1305( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int1825 pub fn crypto_onetimeauth_poly1305(
1826 out: *mut libc::c_uchar,
1827 in_: *const libc::c_uchar,
1828 inlen: libc::c_ulonglong,
1829 k: *const libc::c_uchar,
1830 ) -> libc::c_int;
1831 }
1832 extern "C" {
crypto_onetimeauth_poly1305_verify( h: *const libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int1833 pub fn crypto_onetimeauth_poly1305_verify(
1834 h: *const libc::c_uchar,
1835 in_: *const libc::c_uchar,
1836 inlen: libc::c_ulonglong,
1837 k: *const libc::c_uchar,
1838 ) -> libc::c_int;
1839 }
1840 extern "C" {
crypto_onetimeauth_poly1305_init( state: *mut crypto_onetimeauth_poly1305_state, key: *const libc::c_uchar, ) -> libc::c_int1841 pub fn crypto_onetimeauth_poly1305_init(
1842 state: *mut crypto_onetimeauth_poly1305_state,
1843 key: *const libc::c_uchar,
1844 ) -> libc::c_int;
1845 }
1846 extern "C" {
crypto_onetimeauth_poly1305_update( state: *mut crypto_onetimeauth_poly1305_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1847 pub fn crypto_onetimeauth_poly1305_update(
1848 state: *mut crypto_onetimeauth_poly1305_state,
1849 in_: *const libc::c_uchar,
1850 inlen: libc::c_ulonglong,
1851 ) -> libc::c_int;
1852 }
1853 extern "C" {
crypto_onetimeauth_poly1305_final( state: *mut crypto_onetimeauth_poly1305_state, out: *mut libc::c_uchar, ) -> libc::c_int1854 pub fn crypto_onetimeauth_poly1305_final(
1855 state: *mut crypto_onetimeauth_poly1305_state,
1856 out: *mut libc::c_uchar,
1857 ) -> libc::c_int;
1858 }
1859 extern "C" {
crypto_onetimeauth_poly1305_keygen(k: *mut libc::c_uchar)1860 pub fn crypto_onetimeauth_poly1305_keygen(k: *mut libc::c_uchar);
1861 }
1862 pub type crypto_onetimeauth_state = crypto_onetimeauth_poly1305_state;
1863 extern "C" {
crypto_onetimeauth_statebytes() -> usize1864 pub fn crypto_onetimeauth_statebytes() -> usize;
1865 }
1866 extern "C" {
crypto_onetimeauth_bytes() -> usize1867 pub fn crypto_onetimeauth_bytes() -> usize;
1868 }
1869 extern "C" {
crypto_onetimeauth_keybytes() -> usize1870 pub fn crypto_onetimeauth_keybytes() -> usize;
1871 }
1872 extern "C" {
crypto_onetimeauth_primitive() -> *const libc::c_char1873 pub fn crypto_onetimeauth_primitive() -> *const libc::c_char;
1874 }
1875 extern "C" {
crypto_onetimeauth( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int1876 pub fn crypto_onetimeauth(
1877 out: *mut libc::c_uchar,
1878 in_: *const libc::c_uchar,
1879 inlen: libc::c_ulonglong,
1880 k: *const libc::c_uchar,
1881 ) -> libc::c_int;
1882 }
1883 extern "C" {
crypto_onetimeauth_verify( h: *const libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int1884 pub fn crypto_onetimeauth_verify(
1885 h: *const libc::c_uchar,
1886 in_: *const libc::c_uchar,
1887 inlen: libc::c_ulonglong,
1888 k: *const libc::c_uchar,
1889 ) -> libc::c_int;
1890 }
1891 extern "C" {
crypto_onetimeauth_init( state: *mut crypto_onetimeauth_state, key: *const libc::c_uchar, ) -> libc::c_int1892 pub fn crypto_onetimeauth_init(
1893 state: *mut crypto_onetimeauth_state,
1894 key: *const libc::c_uchar,
1895 ) -> libc::c_int;
1896 }
1897 extern "C" {
crypto_onetimeauth_update( state: *mut crypto_onetimeauth_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1898 pub fn crypto_onetimeauth_update(
1899 state: *mut crypto_onetimeauth_state,
1900 in_: *const libc::c_uchar,
1901 inlen: libc::c_ulonglong,
1902 ) -> libc::c_int;
1903 }
1904 extern "C" {
crypto_onetimeauth_final( state: *mut crypto_onetimeauth_state, out: *mut libc::c_uchar, ) -> libc::c_int1905 pub fn crypto_onetimeauth_final(
1906 state: *mut crypto_onetimeauth_state,
1907 out: *mut libc::c_uchar,
1908 ) -> libc::c_int;
1909 }
1910 extern "C" {
crypto_onetimeauth_keygen(k: *mut libc::c_uchar)1911 pub fn crypto_onetimeauth_keygen(k: *mut libc::c_uchar);
1912 }
1913 extern "C" {
crypto_pwhash_argon2i_alg_argon2i13() -> libc::c_int1914 pub fn crypto_pwhash_argon2i_alg_argon2i13() -> libc::c_int;
1915 }
1916 extern "C" {
crypto_pwhash_argon2i_bytes_min() -> usize1917 pub fn crypto_pwhash_argon2i_bytes_min() -> usize;
1918 }
1919 extern "C" {
crypto_pwhash_argon2i_bytes_max() -> usize1920 pub fn crypto_pwhash_argon2i_bytes_max() -> usize;
1921 }
1922 extern "C" {
crypto_pwhash_argon2i_passwd_min() -> usize1923 pub fn crypto_pwhash_argon2i_passwd_min() -> usize;
1924 }
1925 extern "C" {
crypto_pwhash_argon2i_passwd_max() -> usize1926 pub fn crypto_pwhash_argon2i_passwd_max() -> usize;
1927 }
1928 extern "C" {
crypto_pwhash_argon2i_saltbytes() -> usize1929 pub fn crypto_pwhash_argon2i_saltbytes() -> usize;
1930 }
1931 extern "C" {
crypto_pwhash_argon2i_strbytes() -> usize1932 pub fn crypto_pwhash_argon2i_strbytes() -> usize;
1933 }
1934 extern "C" {
crypto_pwhash_argon2i_strprefix() -> *const libc::c_char1935 pub fn crypto_pwhash_argon2i_strprefix() -> *const libc::c_char;
1936 }
1937 extern "C" {
crypto_pwhash_argon2i_opslimit_min() -> usize1938 pub fn crypto_pwhash_argon2i_opslimit_min() -> usize;
1939 }
1940 extern "C" {
crypto_pwhash_argon2i_opslimit_max() -> usize1941 pub fn crypto_pwhash_argon2i_opslimit_max() -> usize;
1942 }
1943 extern "C" {
crypto_pwhash_argon2i_memlimit_min() -> usize1944 pub fn crypto_pwhash_argon2i_memlimit_min() -> usize;
1945 }
1946 extern "C" {
crypto_pwhash_argon2i_memlimit_max() -> usize1947 pub fn crypto_pwhash_argon2i_memlimit_max() -> usize;
1948 }
1949 extern "C" {
crypto_pwhash_argon2i_opslimit_interactive() -> usize1950 pub fn crypto_pwhash_argon2i_opslimit_interactive() -> usize;
1951 }
1952 extern "C" {
crypto_pwhash_argon2i_memlimit_interactive() -> usize1953 pub fn crypto_pwhash_argon2i_memlimit_interactive() -> usize;
1954 }
1955 extern "C" {
crypto_pwhash_argon2i_opslimit_moderate() -> usize1956 pub fn crypto_pwhash_argon2i_opslimit_moderate() -> usize;
1957 }
1958 extern "C" {
crypto_pwhash_argon2i_memlimit_moderate() -> usize1959 pub fn crypto_pwhash_argon2i_memlimit_moderate() -> usize;
1960 }
1961 extern "C" {
crypto_pwhash_argon2i_opslimit_sensitive() -> usize1962 pub fn crypto_pwhash_argon2i_opslimit_sensitive() -> usize;
1963 }
1964 extern "C" {
crypto_pwhash_argon2i_memlimit_sensitive() -> usize1965 pub fn crypto_pwhash_argon2i_memlimit_sensitive() -> usize;
1966 }
1967 extern "C" {
crypto_pwhash_argon2i( out: *mut libc::c_uchar, outlen: libc::c_ulonglong, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, salt: *const libc::c_uchar, opslimit: libc::c_ulonglong, memlimit: usize, alg: libc::c_int, ) -> libc::c_int1968 pub fn crypto_pwhash_argon2i(
1969 out: *mut libc::c_uchar,
1970 outlen: libc::c_ulonglong,
1971 passwd: *const libc::c_char,
1972 passwdlen: libc::c_ulonglong,
1973 salt: *const libc::c_uchar,
1974 opslimit: libc::c_ulonglong,
1975 memlimit: usize,
1976 alg: libc::c_int,
1977 ) -> libc::c_int;
1978 }
1979 extern "C" {
crypto_pwhash_argon2i_str( out: *mut libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int1980 pub fn crypto_pwhash_argon2i_str(
1981 out: *mut libc::c_char,
1982 passwd: *const libc::c_char,
1983 passwdlen: libc::c_ulonglong,
1984 opslimit: libc::c_ulonglong,
1985 memlimit: usize,
1986 ) -> libc::c_int;
1987 }
1988 extern "C" {
crypto_pwhash_argon2i_str_verify( str_: *const libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, ) -> libc::c_int1989 pub fn crypto_pwhash_argon2i_str_verify(
1990 str_: *const libc::c_char,
1991 passwd: *const libc::c_char,
1992 passwdlen: libc::c_ulonglong,
1993 ) -> libc::c_int;
1994 }
1995 extern "C" {
crypto_pwhash_argon2i_str_needs_rehash( str_: *const libc::c_char, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int1996 pub fn crypto_pwhash_argon2i_str_needs_rehash(
1997 str_: *const libc::c_char,
1998 opslimit: libc::c_ulonglong,
1999 memlimit: usize,
2000 ) -> libc::c_int;
2001 }
2002 extern "C" {
crypto_pwhash_argon2id_alg_argon2id13() -> libc::c_int2003 pub fn crypto_pwhash_argon2id_alg_argon2id13() -> libc::c_int;
2004 }
2005 extern "C" {
crypto_pwhash_argon2id_bytes_min() -> usize2006 pub fn crypto_pwhash_argon2id_bytes_min() -> usize;
2007 }
2008 extern "C" {
crypto_pwhash_argon2id_bytes_max() -> usize2009 pub fn crypto_pwhash_argon2id_bytes_max() -> usize;
2010 }
2011 extern "C" {
crypto_pwhash_argon2id_passwd_min() -> usize2012 pub fn crypto_pwhash_argon2id_passwd_min() -> usize;
2013 }
2014 extern "C" {
crypto_pwhash_argon2id_passwd_max() -> usize2015 pub fn crypto_pwhash_argon2id_passwd_max() -> usize;
2016 }
2017 extern "C" {
crypto_pwhash_argon2id_saltbytes() -> usize2018 pub fn crypto_pwhash_argon2id_saltbytes() -> usize;
2019 }
2020 extern "C" {
crypto_pwhash_argon2id_strbytes() -> usize2021 pub fn crypto_pwhash_argon2id_strbytes() -> usize;
2022 }
2023 extern "C" {
crypto_pwhash_argon2id_strprefix() -> *const libc::c_char2024 pub fn crypto_pwhash_argon2id_strprefix() -> *const libc::c_char;
2025 }
2026 extern "C" {
crypto_pwhash_argon2id_opslimit_min() -> usize2027 pub fn crypto_pwhash_argon2id_opslimit_min() -> usize;
2028 }
2029 extern "C" {
crypto_pwhash_argon2id_opslimit_max() -> usize2030 pub fn crypto_pwhash_argon2id_opslimit_max() -> usize;
2031 }
2032 extern "C" {
crypto_pwhash_argon2id_memlimit_min() -> usize2033 pub fn crypto_pwhash_argon2id_memlimit_min() -> usize;
2034 }
2035 extern "C" {
crypto_pwhash_argon2id_memlimit_max() -> usize2036 pub fn crypto_pwhash_argon2id_memlimit_max() -> usize;
2037 }
2038 extern "C" {
crypto_pwhash_argon2id_opslimit_interactive() -> usize2039 pub fn crypto_pwhash_argon2id_opslimit_interactive() -> usize;
2040 }
2041 extern "C" {
crypto_pwhash_argon2id_memlimit_interactive() -> usize2042 pub fn crypto_pwhash_argon2id_memlimit_interactive() -> usize;
2043 }
2044 extern "C" {
crypto_pwhash_argon2id_opslimit_moderate() -> usize2045 pub fn crypto_pwhash_argon2id_opslimit_moderate() -> usize;
2046 }
2047 extern "C" {
crypto_pwhash_argon2id_memlimit_moderate() -> usize2048 pub fn crypto_pwhash_argon2id_memlimit_moderate() -> usize;
2049 }
2050 extern "C" {
crypto_pwhash_argon2id_opslimit_sensitive() -> usize2051 pub fn crypto_pwhash_argon2id_opslimit_sensitive() -> usize;
2052 }
2053 extern "C" {
crypto_pwhash_argon2id_memlimit_sensitive() -> usize2054 pub fn crypto_pwhash_argon2id_memlimit_sensitive() -> usize;
2055 }
2056 extern "C" {
crypto_pwhash_argon2id( out: *mut libc::c_uchar, outlen: libc::c_ulonglong, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, salt: *const libc::c_uchar, opslimit: libc::c_ulonglong, memlimit: usize, alg: libc::c_int, ) -> libc::c_int2057 pub fn crypto_pwhash_argon2id(
2058 out: *mut libc::c_uchar,
2059 outlen: libc::c_ulonglong,
2060 passwd: *const libc::c_char,
2061 passwdlen: libc::c_ulonglong,
2062 salt: *const libc::c_uchar,
2063 opslimit: libc::c_ulonglong,
2064 memlimit: usize,
2065 alg: libc::c_int,
2066 ) -> libc::c_int;
2067 }
2068 extern "C" {
crypto_pwhash_argon2id_str( out: *mut libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int2069 pub fn crypto_pwhash_argon2id_str(
2070 out: *mut libc::c_char,
2071 passwd: *const libc::c_char,
2072 passwdlen: libc::c_ulonglong,
2073 opslimit: libc::c_ulonglong,
2074 memlimit: usize,
2075 ) -> libc::c_int;
2076 }
2077 extern "C" {
crypto_pwhash_argon2id_str_verify( str_: *const libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, ) -> libc::c_int2078 pub fn crypto_pwhash_argon2id_str_verify(
2079 str_: *const libc::c_char,
2080 passwd: *const libc::c_char,
2081 passwdlen: libc::c_ulonglong,
2082 ) -> libc::c_int;
2083 }
2084 extern "C" {
crypto_pwhash_argon2id_str_needs_rehash( str_: *const libc::c_char, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int2085 pub fn crypto_pwhash_argon2id_str_needs_rehash(
2086 str_: *const libc::c_char,
2087 opslimit: libc::c_ulonglong,
2088 memlimit: usize,
2089 ) -> libc::c_int;
2090 }
2091 extern "C" {
crypto_pwhash_alg_argon2i13() -> libc::c_int2092 pub fn crypto_pwhash_alg_argon2i13() -> libc::c_int;
2093 }
2094 extern "C" {
crypto_pwhash_alg_argon2id13() -> libc::c_int2095 pub fn crypto_pwhash_alg_argon2id13() -> libc::c_int;
2096 }
2097 extern "C" {
crypto_pwhash_alg_default() -> libc::c_int2098 pub fn crypto_pwhash_alg_default() -> libc::c_int;
2099 }
2100 extern "C" {
crypto_pwhash_bytes_min() -> usize2101 pub fn crypto_pwhash_bytes_min() -> usize;
2102 }
2103 extern "C" {
crypto_pwhash_bytes_max() -> usize2104 pub fn crypto_pwhash_bytes_max() -> usize;
2105 }
2106 extern "C" {
crypto_pwhash_passwd_min() -> usize2107 pub fn crypto_pwhash_passwd_min() -> usize;
2108 }
2109 extern "C" {
crypto_pwhash_passwd_max() -> usize2110 pub fn crypto_pwhash_passwd_max() -> usize;
2111 }
2112 extern "C" {
crypto_pwhash_saltbytes() -> usize2113 pub fn crypto_pwhash_saltbytes() -> usize;
2114 }
2115 extern "C" {
crypto_pwhash_strbytes() -> usize2116 pub fn crypto_pwhash_strbytes() -> usize;
2117 }
2118 extern "C" {
crypto_pwhash_strprefix() -> *const libc::c_char2119 pub fn crypto_pwhash_strprefix() -> *const libc::c_char;
2120 }
2121 extern "C" {
crypto_pwhash_opslimit_min() -> usize2122 pub fn crypto_pwhash_opslimit_min() -> usize;
2123 }
2124 extern "C" {
crypto_pwhash_opslimit_max() -> usize2125 pub fn crypto_pwhash_opslimit_max() -> usize;
2126 }
2127 extern "C" {
crypto_pwhash_memlimit_min() -> usize2128 pub fn crypto_pwhash_memlimit_min() -> usize;
2129 }
2130 extern "C" {
crypto_pwhash_memlimit_max() -> usize2131 pub fn crypto_pwhash_memlimit_max() -> usize;
2132 }
2133 extern "C" {
crypto_pwhash_opslimit_interactive() -> usize2134 pub fn crypto_pwhash_opslimit_interactive() -> usize;
2135 }
2136 extern "C" {
crypto_pwhash_memlimit_interactive() -> usize2137 pub fn crypto_pwhash_memlimit_interactive() -> usize;
2138 }
2139 extern "C" {
crypto_pwhash_opslimit_moderate() -> usize2140 pub fn crypto_pwhash_opslimit_moderate() -> usize;
2141 }
2142 extern "C" {
crypto_pwhash_memlimit_moderate() -> usize2143 pub fn crypto_pwhash_memlimit_moderate() -> usize;
2144 }
2145 extern "C" {
crypto_pwhash_opslimit_sensitive() -> usize2146 pub fn crypto_pwhash_opslimit_sensitive() -> usize;
2147 }
2148 extern "C" {
crypto_pwhash_memlimit_sensitive() -> usize2149 pub fn crypto_pwhash_memlimit_sensitive() -> usize;
2150 }
2151 extern "C" {
crypto_pwhash( out: *mut libc::c_uchar, outlen: libc::c_ulonglong, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, salt: *const libc::c_uchar, opslimit: libc::c_ulonglong, memlimit: usize, alg: libc::c_int, ) -> libc::c_int2152 pub fn crypto_pwhash(
2153 out: *mut libc::c_uchar,
2154 outlen: libc::c_ulonglong,
2155 passwd: *const libc::c_char,
2156 passwdlen: libc::c_ulonglong,
2157 salt: *const libc::c_uchar,
2158 opslimit: libc::c_ulonglong,
2159 memlimit: usize,
2160 alg: libc::c_int,
2161 ) -> libc::c_int;
2162 }
2163 extern "C" {
crypto_pwhash_str( out: *mut libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int2164 pub fn crypto_pwhash_str(
2165 out: *mut libc::c_char,
2166 passwd: *const libc::c_char,
2167 passwdlen: libc::c_ulonglong,
2168 opslimit: libc::c_ulonglong,
2169 memlimit: usize,
2170 ) -> libc::c_int;
2171 }
2172 extern "C" {
crypto_pwhash_str_alg( out: *mut libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, opslimit: libc::c_ulonglong, memlimit: usize, alg: libc::c_int, ) -> libc::c_int2173 pub fn crypto_pwhash_str_alg(
2174 out: *mut libc::c_char,
2175 passwd: *const libc::c_char,
2176 passwdlen: libc::c_ulonglong,
2177 opslimit: libc::c_ulonglong,
2178 memlimit: usize,
2179 alg: libc::c_int,
2180 ) -> libc::c_int;
2181 }
2182 extern "C" {
crypto_pwhash_str_verify( str_: *const libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, ) -> libc::c_int2183 pub fn crypto_pwhash_str_verify(
2184 str_: *const libc::c_char,
2185 passwd: *const libc::c_char,
2186 passwdlen: libc::c_ulonglong,
2187 ) -> libc::c_int;
2188 }
2189 extern "C" {
crypto_pwhash_str_needs_rehash( str_: *const libc::c_char, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int2190 pub fn crypto_pwhash_str_needs_rehash(
2191 str_: *const libc::c_char,
2192 opslimit: libc::c_ulonglong,
2193 memlimit: usize,
2194 ) -> libc::c_int;
2195 }
2196 extern "C" {
crypto_pwhash_primitive() -> *const libc::c_char2197 pub fn crypto_pwhash_primitive() -> *const libc::c_char;
2198 }
2199 extern "C" {
crypto_scalarmult_curve25519_bytes() -> usize2200 pub fn crypto_scalarmult_curve25519_bytes() -> usize;
2201 }
2202 extern "C" {
crypto_scalarmult_curve25519_scalarbytes() -> usize2203 pub fn crypto_scalarmult_curve25519_scalarbytes() -> usize;
2204 }
2205 extern "C" {
crypto_scalarmult_curve25519( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int2206 pub fn crypto_scalarmult_curve25519(
2207 q: *mut libc::c_uchar,
2208 n: *const libc::c_uchar,
2209 p: *const libc::c_uchar,
2210 ) -> libc::c_int;
2211 }
2212 extern "C" {
crypto_scalarmult_curve25519_base( q: *mut libc::c_uchar, n: *const libc::c_uchar, ) -> libc::c_int2213 pub fn crypto_scalarmult_curve25519_base(
2214 q: *mut libc::c_uchar,
2215 n: *const libc::c_uchar,
2216 ) -> libc::c_int;
2217 }
2218 extern "C" {
crypto_scalarmult_bytes() -> usize2219 pub fn crypto_scalarmult_bytes() -> usize;
2220 }
2221 extern "C" {
crypto_scalarmult_scalarbytes() -> usize2222 pub fn crypto_scalarmult_scalarbytes() -> usize;
2223 }
2224 extern "C" {
crypto_scalarmult_primitive() -> *const libc::c_char2225 pub fn crypto_scalarmult_primitive() -> *const libc::c_char;
2226 }
2227 extern "C" {
crypto_scalarmult_base(q: *mut libc::c_uchar, n: *const libc::c_uchar) -> libc::c_int2228 pub fn crypto_scalarmult_base(q: *mut libc::c_uchar, n: *const libc::c_uchar) -> libc::c_int;
2229 }
2230 extern "C" {
crypto_scalarmult( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int2231 pub fn crypto_scalarmult(
2232 q: *mut libc::c_uchar,
2233 n: *const libc::c_uchar,
2234 p: *const libc::c_uchar,
2235 ) -> libc::c_int;
2236 }
2237 extern "C" {
crypto_secretbox_xsalsa20poly1305_keybytes() -> usize2238 pub fn crypto_secretbox_xsalsa20poly1305_keybytes() -> usize;
2239 }
2240 extern "C" {
crypto_secretbox_xsalsa20poly1305_noncebytes() -> usize2241 pub fn crypto_secretbox_xsalsa20poly1305_noncebytes() -> usize;
2242 }
2243 extern "C" {
crypto_secretbox_xsalsa20poly1305_macbytes() -> usize2244 pub fn crypto_secretbox_xsalsa20poly1305_macbytes() -> usize;
2245 }
2246 extern "C" {
crypto_secretbox_xsalsa20poly1305_messagebytes_max() -> usize2247 pub fn crypto_secretbox_xsalsa20poly1305_messagebytes_max() -> usize;
2248 }
2249 extern "C" {
crypto_secretbox_xsalsa20poly1305( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2250 pub fn crypto_secretbox_xsalsa20poly1305(
2251 c: *mut libc::c_uchar,
2252 m: *const libc::c_uchar,
2253 mlen: libc::c_ulonglong,
2254 n: *const libc::c_uchar,
2255 k: *const libc::c_uchar,
2256 ) -> libc::c_int;
2257 }
2258 extern "C" {
crypto_secretbox_xsalsa20poly1305_open( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2259 pub fn crypto_secretbox_xsalsa20poly1305_open(
2260 m: *mut libc::c_uchar,
2261 c: *const libc::c_uchar,
2262 clen: libc::c_ulonglong,
2263 n: *const libc::c_uchar,
2264 k: *const libc::c_uchar,
2265 ) -> libc::c_int;
2266 }
2267 extern "C" {
crypto_secretbox_xsalsa20poly1305_keygen(k: *mut libc::c_uchar)2268 pub fn crypto_secretbox_xsalsa20poly1305_keygen(k: *mut libc::c_uchar);
2269 }
2270 extern "C" {
crypto_secretbox_xsalsa20poly1305_boxzerobytes() -> usize2271 pub fn crypto_secretbox_xsalsa20poly1305_boxzerobytes() -> usize;
2272 }
2273 extern "C" {
crypto_secretbox_xsalsa20poly1305_zerobytes() -> usize2274 pub fn crypto_secretbox_xsalsa20poly1305_zerobytes() -> usize;
2275 }
2276 extern "C" {
crypto_secretbox_keybytes() -> usize2277 pub fn crypto_secretbox_keybytes() -> usize;
2278 }
2279 extern "C" {
crypto_secretbox_noncebytes() -> usize2280 pub fn crypto_secretbox_noncebytes() -> usize;
2281 }
2282 extern "C" {
crypto_secretbox_macbytes() -> usize2283 pub fn crypto_secretbox_macbytes() -> usize;
2284 }
2285 extern "C" {
crypto_secretbox_primitive() -> *const libc::c_char2286 pub fn crypto_secretbox_primitive() -> *const libc::c_char;
2287 }
2288 extern "C" {
crypto_secretbox_messagebytes_max() -> usize2289 pub fn crypto_secretbox_messagebytes_max() -> usize;
2290 }
2291 extern "C" {
crypto_secretbox_easy( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2292 pub fn crypto_secretbox_easy(
2293 c: *mut libc::c_uchar,
2294 m: *const libc::c_uchar,
2295 mlen: libc::c_ulonglong,
2296 n: *const libc::c_uchar,
2297 k: *const libc::c_uchar,
2298 ) -> libc::c_int;
2299 }
2300 extern "C" {
crypto_secretbox_open_easy( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2301 pub fn crypto_secretbox_open_easy(
2302 m: *mut libc::c_uchar,
2303 c: *const libc::c_uchar,
2304 clen: libc::c_ulonglong,
2305 n: *const libc::c_uchar,
2306 k: *const libc::c_uchar,
2307 ) -> libc::c_int;
2308 }
2309 extern "C" {
crypto_secretbox_detached( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2310 pub fn crypto_secretbox_detached(
2311 c: *mut libc::c_uchar,
2312 mac: *mut libc::c_uchar,
2313 m: *const libc::c_uchar,
2314 mlen: libc::c_ulonglong,
2315 n: *const libc::c_uchar,
2316 k: *const libc::c_uchar,
2317 ) -> libc::c_int;
2318 }
2319 extern "C" {
crypto_secretbox_open_detached( m: *mut libc::c_uchar, c: *const libc::c_uchar, mac: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2320 pub fn crypto_secretbox_open_detached(
2321 m: *mut libc::c_uchar,
2322 c: *const libc::c_uchar,
2323 mac: *const libc::c_uchar,
2324 clen: libc::c_ulonglong,
2325 n: *const libc::c_uchar,
2326 k: *const libc::c_uchar,
2327 ) -> libc::c_int;
2328 }
2329 extern "C" {
crypto_secretbox_keygen(k: *mut libc::c_uchar)2330 pub fn crypto_secretbox_keygen(k: *mut libc::c_uchar);
2331 }
2332 extern "C" {
crypto_secretbox_zerobytes() -> usize2333 pub fn crypto_secretbox_zerobytes() -> usize;
2334 }
2335 extern "C" {
crypto_secretbox_boxzerobytes() -> usize2336 pub fn crypto_secretbox_boxzerobytes() -> usize;
2337 }
2338 extern "C" {
crypto_secretbox( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2339 pub fn crypto_secretbox(
2340 c: *mut libc::c_uchar,
2341 m: *const libc::c_uchar,
2342 mlen: libc::c_ulonglong,
2343 n: *const libc::c_uchar,
2344 k: *const libc::c_uchar,
2345 ) -> libc::c_int;
2346 }
2347 extern "C" {
crypto_secretbox_open( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2348 pub fn crypto_secretbox_open(
2349 m: *mut libc::c_uchar,
2350 c: *const libc::c_uchar,
2351 clen: libc::c_ulonglong,
2352 n: *const libc::c_uchar,
2353 k: *const libc::c_uchar,
2354 ) -> libc::c_int;
2355 }
2356 extern "C" {
crypto_stream_chacha20_keybytes() -> usize2357 pub fn crypto_stream_chacha20_keybytes() -> usize;
2358 }
2359 extern "C" {
crypto_stream_chacha20_noncebytes() -> usize2360 pub fn crypto_stream_chacha20_noncebytes() -> usize;
2361 }
2362 extern "C" {
crypto_stream_chacha20_messagebytes_max() -> usize2363 pub fn crypto_stream_chacha20_messagebytes_max() -> usize;
2364 }
2365 extern "C" {
crypto_stream_chacha20( c: *mut libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2366 pub fn crypto_stream_chacha20(
2367 c: *mut libc::c_uchar,
2368 clen: libc::c_ulonglong,
2369 n: *const libc::c_uchar,
2370 k: *const libc::c_uchar,
2371 ) -> libc::c_int;
2372 }
2373 extern "C" {
crypto_stream_chacha20_xor( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2374 pub fn crypto_stream_chacha20_xor(
2375 c: *mut libc::c_uchar,
2376 m: *const libc::c_uchar,
2377 mlen: libc::c_ulonglong,
2378 n: *const libc::c_uchar,
2379 k: *const libc::c_uchar,
2380 ) -> libc::c_int;
2381 }
2382 extern "C" {
crypto_stream_chacha20_xor_ic( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, ic: u64, k: *const libc::c_uchar, ) -> libc::c_int2383 pub fn crypto_stream_chacha20_xor_ic(
2384 c: *mut libc::c_uchar,
2385 m: *const libc::c_uchar,
2386 mlen: libc::c_ulonglong,
2387 n: *const libc::c_uchar,
2388 ic: u64,
2389 k: *const libc::c_uchar,
2390 ) -> libc::c_int;
2391 }
2392 extern "C" {
crypto_stream_chacha20_keygen(k: *mut libc::c_uchar)2393 pub fn crypto_stream_chacha20_keygen(k: *mut libc::c_uchar);
2394 }
2395 extern "C" {
crypto_stream_chacha20_ietf_keybytes() -> usize2396 pub fn crypto_stream_chacha20_ietf_keybytes() -> usize;
2397 }
2398 extern "C" {
crypto_stream_chacha20_ietf_noncebytes() -> usize2399 pub fn crypto_stream_chacha20_ietf_noncebytes() -> usize;
2400 }
2401 extern "C" {
crypto_stream_chacha20_ietf_messagebytes_max() -> usize2402 pub fn crypto_stream_chacha20_ietf_messagebytes_max() -> usize;
2403 }
2404 extern "C" {
crypto_stream_chacha20_ietf( c: *mut libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2405 pub fn crypto_stream_chacha20_ietf(
2406 c: *mut libc::c_uchar,
2407 clen: libc::c_ulonglong,
2408 n: *const libc::c_uchar,
2409 k: *const libc::c_uchar,
2410 ) -> libc::c_int;
2411 }
2412 extern "C" {
crypto_stream_chacha20_ietf_xor( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2413 pub fn crypto_stream_chacha20_ietf_xor(
2414 c: *mut libc::c_uchar,
2415 m: *const libc::c_uchar,
2416 mlen: libc::c_ulonglong,
2417 n: *const libc::c_uchar,
2418 k: *const libc::c_uchar,
2419 ) -> libc::c_int;
2420 }
2421 extern "C" {
crypto_stream_chacha20_ietf_xor_ic( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, ic: u32, k: *const libc::c_uchar, ) -> libc::c_int2422 pub fn crypto_stream_chacha20_ietf_xor_ic(
2423 c: *mut libc::c_uchar,
2424 m: *const libc::c_uchar,
2425 mlen: libc::c_ulonglong,
2426 n: *const libc::c_uchar,
2427 ic: u32,
2428 k: *const libc::c_uchar,
2429 ) -> libc::c_int;
2430 }
2431 extern "C" {
crypto_stream_chacha20_ietf_keygen(k: *mut libc::c_uchar)2432 pub fn crypto_stream_chacha20_ietf_keygen(k: *mut libc::c_uchar);
2433 }
2434 extern "C" {
crypto_secretstream_xchacha20poly1305_abytes() -> usize2435 pub fn crypto_secretstream_xchacha20poly1305_abytes() -> usize;
2436 }
2437 extern "C" {
crypto_secretstream_xchacha20poly1305_headerbytes() -> usize2438 pub fn crypto_secretstream_xchacha20poly1305_headerbytes() -> usize;
2439 }
2440 extern "C" {
crypto_secretstream_xchacha20poly1305_keybytes() -> usize2441 pub fn crypto_secretstream_xchacha20poly1305_keybytes() -> usize;
2442 }
2443 extern "C" {
crypto_secretstream_xchacha20poly1305_messagebytes_max() -> usize2444 pub fn crypto_secretstream_xchacha20poly1305_messagebytes_max() -> usize;
2445 }
2446 extern "C" {
crypto_secretstream_xchacha20poly1305_tag_message() -> libc::c_uchar2447 pub fn crypto_secretstream_xchacha20poly1305_tag_message() -> libc::c_uchar;
2448 }
2449 extern "C" {
crypto_secretstream_xchacha20poly1305_tag_push() -> libc::c_uchar2450 pub fn crypto_secretstream_xchacha20poly1305_tag_push() -> libc::c_uchar;
2451 }
2452 extern "C" {
crypto_secretstream_xchacha20poly1305_tag_rekey() -> libc::c_uchar2453 pub fn crypto_secretstream_xchacha20poly1305_tag_rekey() -> libc::c_uchar;
2454 }
2455 extern "C" {
crypto_secretstream_xchacha20poly1305_tag_final() -> libc::c_uchar2456 pub fn crypto_secretstream_xchacha20poly1305_tag_final() -> libc::c_uchar;
2457 }
2458 #[repr(C)]
2459 #[derive(Debug, Copy, Clone)]
2460 pub struct crypto_secretstream_xchacha20poly1305_state {
2461 pub k: [libc::c_uchar; 32usize],
2462 pub nonce: [libc::c_uchar; 12usize],
2463 pub _pad: [libc::c_uchar; 8usize],
2464 }
2465 #[test]
bindgen_test_layout_crypto_secretstream_xchacha20poly1305_state()2466 fn bindgen_test_layout_crypto_secretstream_xchacha20poly1305_state() {
2467 assert_eq!(
2468 ::core::mem::size_of::<crypto_secretstream_xchacha20poly1305_state>(),
2469 52usize,
2470 concat!(
2471 "Size of: ",
2472 stringify!(crypto_secretstream_xchacha20poly1305_state)
2473 )
2474 );
2475 assert_eq!(
2476 ::core::mem::align_of::<crypto_secretstream_xchacha20poly1305_state>(),
2477 1usize,
2478 concat!(
2479 "Alignment of ",
2480 stringify!(crypto_secretstream_xchacha20poly1305_state)
2481 )
2482 );
2483 assert_eq!(
2484 unsafe {
2485 &(*(::core::ptr::null::<crypto_secretstream_xchacha20poly1305_state>())).k as *const _
2486 as usize
2487 },
2488 0usize,
2489 concat!(
2490 "Offset of field: ",
2491 stringify!(crypto_secretstream_xchacha20poly1305_state),
2492 "::",
2493 stringify!(k)
2494 )
2495 );
2496 assert_eq!(
2497 unsafe {
2498 &(*(::core::ptr::null::<crypto_secretstream_xchacha20poly1305_state>())).nonce
2499 as *const _ as usize
2500 },
2501 32usize,
2502 concat!(
2503 "Offset of field: ",
2504 stringify!(crypto_secretstream_xchacha20poly1305_state),
2505 "::",
2506 stringify!(nonce)
2507 )
2508 );
2509 assert_eq!(
2510 unsafe {
2511 &(*(::core::ptr::null::<crypto_secretstream_xchacha20poly1305_state>()))._pad
2512 as *const _ as usize
2513 },
2514 44usize,
2515 concat!(
2516 "Offset of field: ",
2517 stringify!(crypto_secretstream_xchacha20poly1305_state),
2518 "::",
2519 stringify!(_pad)
2520 )
2521 );
2522 }
2523 extern "C" {
crypto_secretstream_xchacha20poly1305_statebytes() -> usize2524 pub fn crypto_secretstream_xchacha20poly1305_statebytes() -> usize;
2525 }
2526 extern "C" {
crypto_secretstream_xchacha20poly1305_keygen(k: *mut libc::c_uchar)2527 pub fn crypto_secretstream_xchacha20poly1305_keygen(k: *mut libc::c_uchar);
2528 }
2529 extern "C" {
crypto_secretstream_xchacha20poly1305_init_push( state: *mut crypto_secretstream_xchacha20poly1305_state, header: *mut libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2530 pub fn crypto_secretstream_xchacha20poly1305_init_push(
2531 state: *mut crypto_secretstream_xchacha20poly1305_state,
2532 header: *mut libc::c_uchar,
2533 k: *const libc::c_uchar,
2534 ) -> libc::c_int;
2535 }
2536 extern "C" {
crypto_secretstream_xchacha20poly1305_push( state: *mut crypto_secretstream_xchacha20poly1305_state, c: *mut libc::c_uchar, clen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, tag: libc::c_uchar, ) -> libc::c_int2537 pub fn crypto_secretstream_xchacha20poly1305_push(
2538 state: *mut crypto_secretstream_xchacha20poly1305_state,
2539 c: *mut libc::c_uchar,
2540 clen_p: *mut libc::c_ulonglong,
2541 m: *const libc::c_uchar,
2542 mlen: libc::c_ulonglong,
2543 ad: *const libc::c_uchar,
2544 adlen: libc::c_ulonglong,
2545 tag: libc::c_uchar,
2546 ) -> libc::c_int;
2547 }
2548 extern "C" {
crypto_secretstream_xchacha20poly1305_init_pull( state: *mut crypto_secretstream_xchacha20poly1305_state, header: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2549 pub fn crypto_secretstream_xchacha20poly1305_init_pull(
2550 state: *mut crypto_secretstream_xchacha20poly1305_state,
2551 header: *const libc::c_uchar,
2552 k: *const libc::c_uchar,
2553 ) -> libc::c_int;
2554 }
2555 extern "C" {
crypto_secretstream_xchacha20poly1305_pull( state: *mut crypto_secretstream_xchacha20poly1305_state, m: *mut libc::c_uchar, mlen_p: *mut libc::c_ulonglong, tag_p: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, ad: *const libc::c_uchar, adlen: libc::c_ulonglong, ) -> libc::c_int2556 pub fn crypto_secretstream_xchacha20poly1305_pull(
2557 state: *mut crypto_secretstream_xchacha20poly1305_state,
2558 m: *mut libc::c_uchar,
2559 mlen_p: *mut libc::c_ulonglong,
2560 tag_p: *mut libc::c_uchar,
2561 c: *const libc::c_uchar,
2562 clen: libc::c_ulonglong,
2563 ad: *const libc::c_uchar,
2564 adlen: libc::c_ulonglong,
2565 ) -> libc::c_int;
2566 }
2567 extern "C" {
crypto_secretstream_xchacha20poly1305_rekey( state: *mut crypto_secretstream_xchacha20poly1305_state, )2568 pub fn crypto_secretstream_xchacha20poly1305_rekey(
2569 state: *mut crypto_secretstream_xchacha20poly1305_state,
2570 );
2571 }
2572 extern "C" {
crypto_shorthash_siphash24_bytes() -> usize2573 pub fn crypto_shorthash_siphash24_bytes() -> usize;
2574 }
2575 extern "C" {
crypto_shorthash_siphash24_keybytes() -> usize2576 pub fn crypto_shorthash_siphash24_keybytes() -> usize;
2577 }
2578 extern "C" {
crypto_shorthash_siphash24( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int2579 pub fn crypto_shorthash_siphash24(
2580 out: *mut libc::c_uchar,
2581 in_: *const libc::c_uchar,
2582 inlen: libc::c_ulonglong,
2583 k: *const libc::c_uchar,
2584 ) -> libc::c_int;
2585 }
2586 extern "C" {
crypto_shorthash_siphashx24_bytes() -> usize2587 pub fn crypto_shorthash_siphashx24_bytes() -> usize;
2588 }
2589 extern "C" {
crypto_shorthash_siphashx24_keybytes() -> usize2590 pub fn crypto_shorthash_siphashx24_keybytes() -> usize;
2591 }
2592 extern "C" {
crypto_shorthash_siphashx24( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int2593 pub fn crypto_shorthash_siphashx24(
2594 out: *mut libc::c_uchar,
2595 in_: *const libc::c_uchar,
2596 inlen: libc::c_ulonglong,
2597 k: *const libc::c_uchar,
2598 ) -> libc::c_int;
2599 }
2600 extern "C" {
crypto_shorthash_bytes() -> usize2601 pub fn crypto_shorthash_bytes() -> usize;
2602 }
2603 extern "C" {
crypto_shorthash_keybytes() -> usize2604 pub fn crypto_shorthash_keybytes() -> usize;
2605 }
2606 extern "C" {
crypto_shorthash_primitive() -> *const libc::c_char2607 pub fn crypto_shorthash_primitive() -> *const libc::c_char;
2608 }
2609 extern "C" {
crypto_shorthash( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, k: *const libc::c_uchar, ) -> libc::c_int2610 pub fn crypto_shorthash(
2611 out: *mut libc::c_uchar,
2612 in_: *const libc::c_uchar,
2613 inlen: libc::c_ulonglong,
2614 k: *const libc::c_uchar,
2615 ) -> libc::c_int;
2616 }
2617 extern "C" {
crypto_shorthash_keygen(k: *mut libc::c_uchar)2618 pub fn crypto_shorthash_keygen(k: *mut libc::c_uchar);
2619 }
2620 #[repr(C)]
2621 #[derive(Debug, Copy, Clone)]
2622 pub struct crypto_sign_ed25519ph_state {
2623 pub hs: crypto_hash_sha512_state,
2624 }
2625 #[test]
bindgen_test_layout_crypto_sign_ed25519ph_state()2626 fn bindgen_test_layout_crypto_sign_ed25519ph_state() {
2627 assert_eq!(
2628 ::core::mem::size_of::<crypto_sign_ed25519ph_state>(),
2629 208usize,
2630 concat!("Size of: ", stringify!(crypto_sign_ed25519ph_state))
2631 );
2632 assert_eq!(
2633 ::core::mem::align_of::<crypto_sign_ed25519ph_state>(),
2634 8usize,
2635 concat!("Alignment of ", stringify!(crypto_sign_ed25519ph_state))
2636 );
2637 assert_eq!(
2638 unsafe { &(*(::core::ptr::null::<crypto_sign_ed25519ph_state>())).hs as *const _ as usize },
2639 0usize,
2640 concat!(
2641 "Offset of field: ",
2642 stringify!(crypto_sign_ed25519ph_state),
2643 "::",
2644 stringify!(hs)
2645 )
2646 );
2647 }
2648 extern "C" {
crypto_sign_ed25519ph_statebytes() -> usize2649 pub fn crypto_sign_ed25519ph_statebytes() -> usize;
2650 }
2651 extern "C" {
crypto_sign_ed25519_bytes() -> usize2652 pub fn crypto_sign_ed25519_bytes() -> usize;
2653 }
2654 extern "C" {
crypto_sign_ed25519_seedbytes() -> usize2655 pub fn crypto_sign_ed25519_seedbytes() -> usize;
2656 }
2657 extern "C" {
crypto_sign_ed25519_publickeybytes() -> usize2658 pub fn crypto_sign_ed25519_publickeybytes() -> usize;
2659 }
2660 extern "C" {
crypto_sign_ed25519_secretkeybytes() -> usize2661 pub fn crypto_sign_ed25519_secretkeybytes() -> usize;
2662 }
2663 extern "C" {
crypto_sign_ed25519_messagebytes_max() -> usize2664 pub fn crypto_sign_ed25519_messagebytes_max() -> usize;
2665 }
2666 extern "C" {
crypto_sign_ed25519( sm: *mut libc::c_uchar, smlen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, sk: *const libc::c_uchar, ) -> libc::c_int2667 pub fn crypto_sign_ed25519(
2668 sm: *mut libc::c_uchar,
2669 smlen_p: *mut libc::c_ulonglong,
2670 m: *const libc::c_uchar,
2671 mlen: libc::c_ulonglong,
2672 sk: *const libc::c_uchar,
2673 ) -> libc::c_int;
2674 }
2675 extern "C" {
crypto_sign_ed25519_open( m: *mut libc::c_uchar, mlen_p: *mut libc::c_ulonglong, sm: *const libc::c_uchar, smlen: libc::c_ulonglong, pk: *const libc::c_uchar, ) -> libc::c_int2676 pub fn crypto_sign_ed25519_open(
2677 m: *mut libc::c_uchar,
2678 mlen_p: *mut libc::c_ulonglong,
2679 sm: *const libc::c_uchar,
2680 smlen: libc::c_ulonglong,
2681 pk: *const libc::c_uchar,
2682 ) -> libc::c_int;
2683 }
2684 extern "C" {
crypto_sign_ed25519_detached( sig: *mut libc::c_uchar, siglen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, sk: *const libc::c_uchar, ) -> libc::c_int2685 pub fn crypto_sign_ed25519_detached(
2686 sig: *mut libc::c_uchar,
2687 siglen_p: *mut libc::c_ulonglong,
2688 m: *const libc::c_uchar,
2689 mlen: libc::c_ulonglong,
2690 sk: *const libc::c_uchar,
2691 ) -> libc::c_int;
2692 }
2693 extern "C" {
crypto_sign_ed25519_verify_detached( sig: *const libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, pk: *const libc::c_uchar, ) -> libc::c_int2694 pub fn crypto_sign_ed25519_verify_detached(
2695 sig: *const libc::c_uchar,
2696 m: *const libc::c_uchar,
2697 mlen: libc::c_ulonglong,
2698 pk: *const libc::c_uchar,
2699 ) -> libc::c_int;
2700 }
2701 extern "C" {
crypto_sign_ed25519_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, ) -> libc::c_int2702 pub fn crypto_sign_ed25519_keypair(
2703 pk: *mut libc::c_uchar,
2704 sk: *mut libc::c_uchar,
2705 ) -> libc::c_int;
2706 }
2707 extern "C" {
crypto_sign_ed25519_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int2708 pub fn crypto_sign_ed25519_seed_keypair(
2709 pk: *mut libc::c_uchar,
2710 sk: *mut libc::c_uchar,
2711 seed: *const libc::c_uchar,
2712 ) -> libc::c_int;
2713 }
2714 extern "C" {
crypto_sign_ed25519_pk_to_curve25519( curve25519_pk: *mut libc::c_uchar, ed25519_pk: *const libc::c_uchar, ) -> libc::c_int2715 pub fn crypto_sign_ed25519_pk_to_curve25519(
2716 curve25519_pk: *mut libc::c_uchar,
2717 ed25519_pk: *const libc::c_uchar,
2718 ) -> libc::c_int;
2719 }
2720 extern "C" {
crypto_sign_ed25519_sk_to_curve25519( curve25519_sk: *mut libc::c_uchar, ed25519_sk: *const libc::c_uchar, ) -> libc::c_int2721 pub fn crypto_sign_ed25519_sk_to_curve25519(
2722 curve25519_sk: *mut libc::c_uchar,
2723 ed25519_sk: *const libc::c_uchar,
2724 ) -> libc::c_int;
2725 }
2726 extern "C" {
crypto_sign_ed25519_sk_to_seed( seed: *mut libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int2727 pub fn crypto_sign_ed25519_sk_to_seed(
2728 seed: *mut libc::c_uchar,
2729 sk: *const libc::c_uchar,
2730 ) -> libc::c_int;
2731 }
2732 extern "C" {
crypto_sign_ed25519_sk_to_pk( pk: *mut libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int2733 pub fn crypto_sign_ed25519_sk_to_pk(
2734 pk: *mut libc::c_uchar,
2735 sk: *const libc::c_uchar,
2736 ) -> libc::c_int;
2737 }
2738 extern "C" {
crypto_sign_ed25519ph_init(state: *mut crypto_sign_ed25519ph_state) -> libc::c_int2739 pub fn crypto_sign_ed25519ph_init(state: *mut crypto_sign_ed25519ph_state) -> libc::c_int;
2740 }
2741 extern "C" {
crypto_sign_ed25519ph_update( state: *mut crypto_sign_ed25519ph_state, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ) -> libc::c_int2742 pub fn crypto_sign_ed25519ph_update(
2743 state: *mut crypto_sign_ed25519ph_state,
2744 m: *const libc::c_uchar,
2745 mlen: libc::c_ulonglong,
2746 ) -> libc::c_int;
2747 }
2748 extern "C" {
crypto_sign_ed25519ph_final_create( state: *mut crypto_sign_ed25519ph_state, sig: *mut libc::c_uchar, siglen_p: *mut libc::c_ulonglong, sk: *const libc::c_uchar, ) -> libc::c_int2749 pub fn crypto_sign_ed25519ph_final_create(
2750 state: *mut crypto_sign_ed25519ph_state,
2751 sig: *mut libc::c_uchar,
2752 siglen_p: *mut libc::c_ulonglong,
2753 sk: *const libc::c_uchar,
2754 ) -> libc::c_int;
2755 }
2756 extern "C" {
crypto_sign_ed25519ph_final_verify( state: *mut crypto_sign_ed25519ph_state, sig: *const libc::c_uchar, pk: *const libc::c_uchar, ) -> libc::c_int2757 pub fn crypto_sign_ed25519ph_final_verify(
2758 state: *mut crypto_sign_ed25519ph_state,
2759 sig: *const libc::c_uchar,
2760 pk: *const libc::c_uchar,
2761 ) -> libc::c_int;
2762 }
2763 pub type crypto_sign_state = crypto_sign_ed25519ph_state;
2764 extern "C" {
crypto_sign_statebytes() -> usize2765 pub fn crypto_sign_statebytes() -> usize;
2766 }
2767 extern "C" {
crypto_sign_bytes() -> usize2768 pub fn crypto_sign_bytes() -> usize;
2769 }
2770 extern "C" {
crypto_sign_seedbytes() -> usize2771 pub fn crypto_sign_seedbytes() -> usize;
2772 }
2773 extern "C" {
crypto_sign_publickeybytes() -> usize2774 pub fn crypto_sign_publickeybytes() -> usize;
2775 }
2776 extern "C" {
crypto_sign_secretkeybytes() -> usize2777 pub fn crypto_sign_secretkeybytes() -> usize;
2778 }
2779 extern "C" {
crypto_sign_messagebytes_max() -> usize2780 pub fn crypto_sign_messagebytes_max() -> usize;
2781 }
2782 extern "C" {
crypto_sign_primitive() -> *const libc::c_char2783 pub fn crypto_sign_primitive() -> *const libc::c_char;
2784 }
2785 extern "C" {
crypto_sign_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int2786 pub fn crypto_sign_seed_keypair(
2787 pk: *mut libc::c_uchar,
2788 sk: *mut libc::c_uchar,
2789 seed: *const libc::c_uchar,
2790 ) -> libc::c_int;
2791 }
2792 extern "C" {
crypto_sign_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int2793 pub fn crypto_sign_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int;
2794 }
2795 extern "C" {
crypto_sign( sm: *mut libc::c_uchar, smlen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, sk: *const libc::c_uchar, ) -> libc::c_int2796 pub fn crypto_sign(
2797 sm: *mut libc::c_uchar,
2798 smlen_p: *mut libc::c_ulonglong,
2799 m: *const libc::c_uchar,
2800 mlen: libc::c_ulonglong,
2801 sk: *const libc::c_uchar,
2802 ) -> libc::c_int;
2803 }
2804 extern "C" {
crypto_sign_open( m: *mut libc::c_uchar, mlen_p: *mut libc::c_ulonglong, sm: *const libc::c_uchar, smlen: libc::c_ulonglong, pk: *const libc::c_uchar, ) -> libc::c_int2805 pub fn crypto_sign_open(
2806 m: *mut libc::c_uchar,
2807 mlen_p: *mut libc::c_ulonglong,
2808 sm: *const libc::c_uchar,
2809 smlen: libc::c_ulonglong,
2810 pk: *const libc::c_uchar,
2811 ) -> libc::c_int;
2812 }
2813 extern "C" {
crypto_sign_detached( sig: *mut libc::c_uchar, siglen_p: *mut libc::c_ulonglong, m: *const libc::c_uchar, mlen: libc::c_ulonglong, sk: *const libc::c_uchar, ) -> libc::c_int2814 pub fn crypto_sign_detached(
2815 sig: *mut libc::c_uchar,
2816 siglen_p: *mut libc::c_ulonglong,
2817 m: *const libc::c_uchar,
2818 mlen: libc::c_ulonglong,
2819 sk: *const libc::c_uchar,
2820 ) -> libc::c_int;
2821 }
2822 extern "C" {
crypto_sign_verify_detached( sig: *const libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, pk: *const libc::c_uchar, ) -> libc::c_int2823 pub fn crypto_sign_verify_detached(
2824 sig: *const libc::c_uchar,
2825 m: *const libc::c_uchar,
2826 mlen: libc::c_ulonglong,
2827 pk: *const libc::c_uchar,
2828 ) -> libc::c_int;
2829 }
2830 extern "C" {
crypto_sign_init(state: *mut crypto_sign_state) -> libc::c_int2831 pub fn crypto_sign_init(state: *mut crypto_sign_state) -> libc::c_int;
2832 }
2833 extern "C" {
crypto_sign_update( state: *mut crypto_sign_state, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ) -> libc::c_int2834 pub fn crypto_sign_update(
2835 state: *mut crypto_sign_state,
2836 m: *const libc::c_uchar,
2837 mlen: libc::c_ulonglong,
2838 ) -> libc::c_int;
2839 }
2840 extern "C" {
crypto_sign_final_create( state: *mut crypto_sign_state, sig: *mut libc::c_uchar, siglen_p: *mut libc::c_ulonglong, sk: *const libc::c_uchar, ) -> libc::c_int2841 pub fn crypto_sign_final_create(
2842 state: *mut crypto_sign_state,
2843 sig: *mut libc::c_uchar,
2844 siglen_p: *mut libc::c_ulonglong,
2845 sk: *const libc::c_uchar,
2846 ) -> libc::c_int;
2847 }
2848 extern "C" {
crypto_sign_final_verify( state: *mut crypto_sign_state, sig: *const libc::c_uchar, pk: *const libc::c_uchar, ) -> libc::c_int2849 pub fn crypto_sign_final_verify(
2850 state: *mut crypto_sign_state,
2851 sig: *const libc::c_uchar,
2852 pk: *const libc::c_uchar,
2853 ) -> libc::c_int;
2854 }
2855 extern "C" {
crypto_stream_keybytes() -> usize2856 pub fn crypto_stream_keybytes() -> usize;
2857 }
2858 extern "C" {
crypto_stream_noncebytes() -> usize2859 pub fn crypto_stream_noncebytes() -> usize;
2860 }
2861 extern "C" {
crypto_stream_messagebytes_max() -> usize2862 pub fn crypto_stream_messagebytes_max() -> usize;
2863 }
2864 extern "C" {
crypto_stream_primitive() -> *const libc::c_char2865 pub fn crypto_stream_primitive() -> *const libc::c_char;
2866 }
2867 extern "C" {
crypto_stream( c: *mut libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2868 pub fn crypto_stream(
2869 c: *mut libc::c_uchar,
2870 clen: libc::c_ulonglong,
2871 n: *const libc::c_uchar,
2872 k: *const libc::c_uchar,
2873 ) -> libc::c_int;
2874 }
2875 extern "C" {
crypto_stream_xor( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2876 pub fn crypto_stream_xor(
2877 c: *mut libc::c_uchar,
2878 m: *const libc::c_uchar,
2879 mlen: libc::c_ulonglong,
2880 n: *const libc::c_uchar,
2881 k: *const libc::c_uchar,
2882 ) -> libc::c_int;
2883 }
2884 extern "C" {
crypto_stream_keygen(k: *mut libc::c_uchar)2885 pub fn crypto_stream_keygen(k: *mut libc::c_uchar);
2886 }
2887 extern "C" {
crypto_stream_salsa20_keybytes() -> usize2888 pub fn crypto_stream_salsa20_keybytes() -> usize;
2889 }
2890 extern "C" {
crypto_stream_salsa20_noncebytes() -> usize2891 pub fn crypto_stream_salsa20_noncebytes() -> usize;
2892 }
2893 extern "C" {
crypto_stream_salsa20_messagebytes_max() -> usize2894 pub fn crypto_stream_salsa20_messagebytes_max() -> usize;
2895 }
2896 extern "C" {
crypto_stream_salsa20( c: *mut libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2897 pub fn crypto_stream_salsa20(
2898 c: *mut libc::c_uchar,
2899 clen: libc::c_ulonglong,
2900 n: *const libc::c_uchar,
2901 k: *const libc::c_uchar,
2902 ) -> libc::c_int;
2903 }
2904 extern "C" {
crypto_stream_salsa20_xor( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int2905 pub fn crypto_stream_salsa20_xor(
2906 c: *mut libc::c_uchar,
2907 m: *const libc::c_uchar,
2908 mlen: libc::c_ulonglong,
2909 n: *const libc::c_uchar,
2910 k: *const libc::c_uchar,
2911 ) -> libc::c_int;
2912 }
2913 extern "C" {
crypto_stream_salsa20_xor_ic( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, ic: u64, k: *const libc::c_uchar, ) -> libc::c_int2914 pub fn crypto_stream_salsa20_xor_ic(
2915 c: *mut libc::c_uchar,
2916 m: *const libc::c_uchar,
2917 mlen: libc::c_ulonglong,
2918 n: *const libc::c_uchar,
2919 ic: u64,
2920 k: *const libc::c_uchar,
2921 ) -> libc::c_int;
2922 }
2923 extern "C" {
crypto_stream_salsa20_keygen(k: *mut libc::c_uchar)2924 pub fn crypto_stream_salsa20_keygen(k: *mut libc::c_uchar);
2925 }
2926 extern "C" {
crypto_verify_16_bytes() -> usize2927 pub fn crypto_verify_16_bytes() -> usize;
2928 }
2929 extern "C" {
crypto_verify_16(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int2930 pub fn crypto_verify_16(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int;
2931 }
2932 extern "C" {
crypto_verify_32_bytes() -> usize2933 pub fn crypto_verify_32_bytes() -> usize;
2934 }
2935 extern "C" {
crypto_verify_32(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int2936 pub fn crypto_verify_32(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int;
2937 }
2938 extern "C" {
crypto_verify_64_bytes() -> usize2939 pub fn crypto_verify_64_bytes() -> usize;
2940 }
2941 extern "C" {
crypto_verify_64(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int2942 pub fn crypto_verify_64(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int;
2943 }
2944 #[repr(C)]
2945 #[derive(Debug, Copy, Clone)]
2946 pub struct randombytes_implementation {
2947 pub implementation_name: ::core::option::Option<unsafe extern "C" fn() -> *const libc::c_char>,
2948 pub random: ::core::option::Option<unsafe extern "C" fn() -> u32>,
2949 pub stir: ::core::option::Option<unsafe extern "C" fn()>,
2950 pub uniform: ::core::option::Option<unsafe extern "C" fn(upper_bound: u32) -> u32>,
2951 pub buf: ::core::option::Option<unsafe extern "C" fn(buf: *mut libc::c_void, size: usize)>,
2952 pub close: ::core::option::Option<unsafe extern "C" fn() -> libc::c_int>,
2953 }
2954 #[test]
bindgen_test_layout_randombytes_implementation()2955 fn bindgen_test_layout_randombytes_implementation() {
2956 assert_eq!(
2957 ::core::mem::size_of::<randombytes_implementation>(),
2958 48usize,
2959 concat!("Size of: ", stringify!(randombytes_implementation))
2960 );
2961 assert_eq!(
2962 ::core::mem::align_of::<randombytes_implementation>(),
2963 8usize,
2964 concat!("Alignment of ", stringify!(randombytes_implementation))
2965 );
2966 assert_eq!(
2967 unsafe {
2968 &(*(::core::ptr::null::<randombytes_implementation>())).implementation_name as *const _
2969 as usize
2970 },
2971 0usize,
2972 concat!(
2973 "Offset of field: ",
2974 stringify!(randombytes_implementation),
2975 "::",
2976 stringify!(implementation_name)
2977 )
2978 );
2979 assert_eq!(
2980 unsafe {
2981 &(*(::core::ptr::null::<randombytes_implementation>())).random as *const _ as usize
2982 },
2983 8usize,
2984 concat!(
2985 "Offset of field: ",
2986 stringify!(randombytes_implementation),
2987 "::",
2988 stringify!(random)
2989 )
2990 );
2991 assert_eq!(
2992 unsafe {
2993 &(*(::core::ptr::null::<randombytes_implementation>())).stir as *const _ as usize
2994 },
2995 16usize,
2996 concat!(
2997 "Offset of field: ",
2998 stringify!(randombytes_implementation),
2999 "::",
3000 stringify!(stir)
3001 )
3002 );
3003 assert_eq!(
3004 unsafe {
3005 &(*(::core::ptr::null::<randombytes_implementation>())).uniform as *const _ as usize
3006 },
3007 24usize,
3008 concat!(
3009 "Offset of field: ",
3010 stringify!(randombytes_implementation),
3011 "::",
3012 stringify!(uniform)
3013 )
3014 );
3015 assert_eq!(
3016 unsafe { &(*(::core::ptr::null::<randombytes_implementation>())).buf as *const _ as usize },
3017 32usize,
3018 concat!(
3019 "Offset of field: ",
3020 stringify!(randombytes_implementation),
3021 "::",
3022 stringify!(buf)
3023 )
3024 );
3025 assert_eq!(
3026 unsafe {
3027 &(*(::core::ptr::null::<randombytes_implementation>())).close as *const _ as usize
3028 },
3029 40usize,
3030 concat!(
3031 "Offset of field: ",
3032 stringify!(randombytes_implementation),
3033 "::",
3034 stringify!(close)
3035 )
3036 );
3037 }
3038 extern "C" {
randombytes_seedbytes() -> usize3039 pub fn randombytes_seedbytes() -> usize;
3040 }
3041 extern "C" {
randombytes_buf(buf: *mut libc::c_void, size: usize)3042 pub fn randombytes_buf(buf: *mut libc::c_void, size: usize);
3043 }
3044 extern "C" {
randombytes_buf_deterministic( buf: *mut libc::c_void, size: usize, seed: *const libc::c_uchar, )3045 pub fn randombytes_buf_deterministic(
3046 buf: *mut libc::c_void,
3047 size: usize,
3048 seed: *const libc::c_uchar,
3049 );
3050 }
3051 extern "C" {
randombytes_random() -> u323052 pub fn randombytes_random() -> u32;
3053 }
3054 extern "C" {
randombytes_uniform(upper_bound: u32) -> u323055 pub fn randombytes_uniform(upper_bound: u32) -> u32;
3056 }
3057 extern "C" {
randombytes_stir()3058 pub fn randombytes_stir();
3059 }
3060 extern "C" {
randombytes_close() -> libc::c_int3061 pub fn randombytes_close() -> libc::c_int;
3062 }
3063 extern "C" {
randombytes_set_implementation(impl_: *mut randombytes_implementation) -> libc::c_int3064 pub fn randombytes_set_implementation(impl_: *mut randombytes_implementation) -> libc::c_int;
3065 }
3066 extern "C" {
randombytes_implementation_name() -> *const libc::c_char3067 pub fn randombytes_implementation_name() -> *const libc::c_char;
3068 }
3069 extern "C" {
3070 pub static mut randombytes_internal_implementation: randombytes_implementation;
3071 }
3072 extern "C" {
3073 pub static mut randombytes_sysrandom_implementation: randombytes_implementation;
3074 }
3075 extern "C" {
sodium_runtime_has_neon() -> libc::c_int3076 pub fn sodium_runtime_has_neon() -> libc::c_int;
3077 }
3078 extern "C" {
sodium_runtime_has_sse2() -> libc::c_int3079 pub fn sodium_runtime_has_sse2() -> libc::c_int;
3080 }
3081 extern "C" {
sodium_runtime_has_sse3() -> libc::c_int3082 pub fn sodium_runtime_has_sse3() -> libc::c_int;
3083 }
3084 extern "C" {
sodium_runtime_has_ssse3() -> libc::c_int3085 pub fn sodium_runtime_has_ssse3() -> libc::c_int;
3086 }
3087 extern "C" {
sodium_runtime_has_sse41() -> libc::c_int3088 pub fn sodium_runtime_has_sse41() -> libc::c_int;
3089 }
3090 extern "C" {
sodium_runtime_has_avx() -> libc::c_int3091 pub fn sodium_runtime_has_avx() -> libc::c_int;
3092 }
3093 extern "C" {
sodium_runtime_has_avx2() -> libc::c_int3094 pub fn sodium_runtime_has_avx2() -> libc::c_int;
3095 }
3096 extern "C" {
sodium_runtime_has_avx512f() -> libc::c_int3097 pub fn sodium_runtime_has_avx512f() -> libc::c_int;
3098 }
3099 extern "C" {
sodium_runtime_has_pclmul() -> libc::c_int3100 pub fn sodium_runtime_has_pclmul() -> libc::c_int;
3101 }
3102 extern "C" {
sodium_runtime_has_aesni() -> libc::c_int3103 pub fn sodium_runtime_has_aesni() -> libc::c_int;
3104 }
3105 extern "C" {
sodium_runtime_has_rdrand() -> libc::c_int3106 pub fn sodium_runtime_has_rdrand() -> libc::c_int;
3107 }
3108 extern "C" {
sodium_memzero(pnt: *mut libc::c_void, len: usize)3109 pub fn sodium_memzero(pnt: *mut libc::c_void, len: usize);
3110 }
3111 extern "C" {
sodium_stackzero(len: usize)3112 pub fn sodium_stackzero(len: usize);
3113 }
3114 extern "C" {
sodium_memcmp( b1_: *const libc::c_void, b2_: *const libc::c_void, len: usize, ) -> libc::c_int3115 pub fn sodium_memcmp(
3116 b1_: *const libc::c_void,
3117 b2_: *const libc::c_void,
3118 len: usize,
3119 ) -> libc::c_int;
3120 }
3121 extern "C" {
sodium_compare( b1_: *const libc::c_uchar, b2_: *const libc::c_uchar, len: usize, ) -> libc::c_int3122 pub fn sodium_compare(
3123 b1_: *const libc::c_uchar,
3124 b2_: *const libc::c_uchar,
3125 len: usize,
3126 ) -> libc::c_int;
3127 }
3128 extern "C" {
sodium_is_zero(n: *const libc::c_uchar, nlen: usize) -> libc::c_int3129 pub fn sodium_is_zero(n: *const libc::c_uchar, nlen: usize) -> libc::c_int;
3130 }
3131 extern "C" {
sodium_increment(n: *mut libc::c_uchar, nlen: usize)3132 pub fn sodium_increment(n: *mut libc::c_uchar, nlen: usize);
3133 }
3134 extern "C" {
sodium_add(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize)3135 pub fn sodium_add(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize);
3136 }
3137 extern "C" {
sodium_sub(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize)3138 pub fn sodium_sub(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize);
3139 }
3140 extern "C" {
sodium_bin2hex( hex: *mut libc::c_char, hex_maxlen: usize, bin: *const libc::c_uchar, bin_len: usize, ) -> *mut libc::c_char3141 pub fn sodium_bin2hex(
3142 hex: *mut libc::c_char,
3143 hex_maxlen: usize,
3144 bin: *const libc::c_uchar,
3145 bin_len: usize,
3146 ) -> *mut libc::c_char;
3147 }
3148 extern "C" {
sodium_hex2bin( bin: *mut libc::c_uchar, bin_maxlen: usize, hex: *const libc::c_char, hex_len: usize, ignore: *const libc::c_char, bin_len: *mut usize, hex_end: *mut *const libc::c_char, ) -> libc::c_int3149 pub fn sodium_hex2bin(
3150 bin: *mut libc::c_uchar,
3151 bin_maxlen: usize,
3152 hex: *const libc::c_char,
3153 hex_len: usize,
3154 ignore: *const libc::c_char,
3155 bin_len: *mut usize,
3156 hex_end: *mut *const libc::c_char,
3157 ) -> libc::c_int;
3158 }
3159 extern "C" {
sodium_base64_encoded_len(bin_len: usize, variant: libc::c_int) -> usize3160 pub fn sodium_base64_encoded_len(bin_len: usize, variant: libc::c_int) -> usize;
3161 }
3162 extern "C" {
sodium_bin2base64( b64: *mut libc::c_char, b64_maxlen: usize, bin: *const libc::c_uchar, bin_len: usize, variant: libc::c_int, ) -> *mut libc::c_char3163 pub fn sodium_bin2base64(
3164 b64: *mut libc::c_char,
3165 b64_maxlen: usize,
3166 bin: *const libc::c_uchar,
3167 bin_len: usize,
3168 variant: libc::c_int,
3169 ) -> *mut libc::c_char;
3170 }
3171 extern "C" {
sodium_base642bin( bin: *mut libc::c_uchar, bin_maxlen: usize, b64: *const libc::c_char, b64_len: usize, ignore: *const libc::c_char, bin_len: *mut usize, b64_end: *mut *const libc::c_char, variant: libc::c_int, ) -> libc::c_int3172 pub fn sodium_base642bin(
3173 bin: *mut libc::c_uchar,
3174 bin_maxlen: usize,
3175 b64: *const libc::c_char,
3176 b64_len: usize,
3177 ignore: *const libc::c_char,
3178 bin_len: *mut usize,
3179 b64_end: *mut *const libc::c_char,
3180 variant: libc::c_int,
3181 ) -> libc::c_int;
3182 }
3183 extern "C" {
sodium_mlock(addr: *mut libc::c_void, len: usize) -> libc::c_int3184 pub fn sodium_mlock(addr: *mut libc::c_void, len: usize) -> libc::c_int;
3185 }
3186 extern "C" {
sodium_munlock(addr: *mut libc::c_void, len: usize) -> libc::c_int3187 pub fn sodium_munlock(addr: *mut libc::c_void, len: usize) -> libc::c_int;
3188 }
3189 extern "C" {
sodium_malloc(size: usize) -> *mut libc::c_void3190 pub fn sodium_malloc(size: usize) -> *mut libc::c_void;
3191 }
3192 extern "C" {
sodium_allocarray(count: usize, size: usize) -> *mut libc::c_void3193 pub fn sodium_allocarray(count: usize, size: usize) -> *mut libc::c_void;
3194 }
3195 extern "C" {
sodium_free(ptr: *mut libc::c_void)3196 pub fn sodium_free(ptr: *mut libc::c_void);
3197 }
3198 extern "C" {
sodium_mprotect_noaccess(ptr: *mut libc::c_void) -> libc::c_int3199 pub fn sodium_mprotect_noaccess(ptr: *mut libc::c_void) -> libc::c_int;
3200 }
3201 extern "C" {
sodium_mprotect_readonly(ptr: *mut libc::c_void) -> libc::c_int3202 pub fn sodium_mprotect_readonly(ptr: *mut libc::c_void) -> libc::c_int;
3203 }
3204 extern "C" {
sodium_mprotect_readwrite(ptr: *mut libc::c_void) -> libc::c_int3205 pub fn sodium_mprotect_readwrite(ptr: *mut libc::c_void) -> libc::c_int;
3206 }
3207 extern "C" {
sodium_pad( padded_buflen_p: *mut usize, buf: *mut libc::c_uchar, unpadded_buflen: usize, blocksize: usize, max_buflen: usize, ) -> libc::c_int3208 pub fn sodium_pad(
3209 padded_buflen_p: *mut usize,
3210 buf: *mut libc::c_uchar,
3211 unpadded_buflen: usize,
3212 blocksize: usize,
3213 max_buflen: usize,
3214 ) -> libc::c_int;
3215 }
3216 extern "C" {
sodium_unpad( unpadded_buflen_p: *mut usize, buf: *const libc::c_uchar, padded_buflen: usize, blocksize: usize, ) -> libc::c_int3217 pub fn sodium_unpad(
3218 unpadded_buflen_p: *mut usize,
3219 buf: *const libc::c_uchar,
3220 padded_buflen: usize,
3221 blocksize: usize,
3222 ) -> libc::c_int;
3223 }
3224 extern "C" {
crypto_stream_xchacha20_keybytes() -> usize3225 pub fn crypto_stream_xchacha20_keybytes() -> usize;
3226 }
3227 extern "C" {
crypto_stream_xchacha20_noncebytes() -> usize3228 pub fn crypto_stream_xchacha20_noncebytes() -> usize;
3229 }
3230 extern "C" {
crypto_stream_xchacha20_messagebytes_max() -> usize3231 pub fn crypto_stream_xchacha20_messagebytes_max() -> usize;
3232 }
3233 extern "C" {
crypto_stream_xchacha20( c: *mut libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3234 pub fn crypto_stream_xchacha20(
3235 c: *mut libc::c_uchar,
3236 clen: libc::c_ulonglong,
3237 n: *const libc::c_uchar,
3238 k: *const libc::c_uchar,
3239 ) -> libc::c_int;
3240 }
3241 extern "C" {
crypto_stream_xchacha20_xor( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3242 pub fn crypto_stream_xchacha20_xor(
3243 c: *mut libc::c_uchar,
3244 m: *const libc::c_uchar,
3245 mlen: libc::c_ulonglong,
3246 n: *const libc::c_uchar,
3247 k: *const libc::c_uchar,
3248 ) -> libc::c_int;
3249 }
3250 extern "C" {
crypto_stream_xchacha20_xor_ic( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, ic: u64, k: *const libc::c_uchar, ) -> libc::c_int3251 pub fn crypto_stream_xchacha20_xor_ic(
3252 c: *mut libc::c_uchar,
3253 m: *const libc::c_uchar,
3254 mlen: libc::c_ulonglong,
3255 n: *const libc::c_uchar,
3256 ic: u64,
3257 k: *const libc::c_uchar,
3258 ) -> libc::c_int;
3259 }
3260 extern "C" {
crypto_stream_xchacha20_keygen(k: *mut libc::c_uchar)3261 pub fn crypto_stream_xchacha20_keygen(k: *mut libc::c_uchar);
3262 }
3263 extern "C" {
crypto_box_curve25519xchacha20poly1305_seedbytes() -> usize3264 pub fn crypto_box_curve25519xchacha20poly1305_seedbytes() -> usize;
3265 }
3266 extern "C" {
crypto_box_curve25519xchacha20poly1305_publickeybytes() -> usize3267 pub fn crypto_box_curve25519xchacha20poly1305_publickeybytes() -> usize;
3268 }
3269 extern "C" {
crypto_box_curve25519xchacha20poly1305_secretkeybytes() -> usize3270 pub fn crypto_box_curve25519xchacha20poly1305_secretkeybytes() -> usize;
3271 }
3272 extern "C" {
crypto_box_curve25519xchacha20poly1305_beforenmbytes() -> usize3273 pub fn crypto_box_curve25519xchacha20poly1305_beforenmbytes() -> usize;
3274 }
3275 extern "C" {
crypto_box_curve25519xchacha20poly1305_noncebytes() -> usize3276 pub fn crypto_box_curve25519xchacha20poly1305_noncebytes() -> usize;
3277 }
3278 extern "C" {
crypto_box_curve25519xchacha20poly1305_macbytes() -> usize3279 pub fn crypto_box_curve25519xchacha20poly1305_macbytes() -> usize;
3280 }
3281 extern "C" {
crypto_box_curve25519xchacha20poly1305_messagebytes_max() -> usize3282 pub fn crypto_box_curve25519xchacha20poly1305_messagebytes_max() -> usize;
3283 }
3284 extern "C" {
crypto_box_curve25519xchacha20poly1305_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int3285 pub fn crypto_box_curve25519xchacha20poly1305_seed_keypair(
3286 pk: *mut libc::c_uchar,
3287 sk: *mut libc::c_uchar,
3288 seed: *const libc::c_uchar,
3289 ) -> libc::c_int;
3290 }
3291 extern "C" {
crypto_box_curve25519xchacha20poly1305_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, ) -> libc::c_int3292 pub fn crypto_box_curve25519xchacha20poly1305_keypair(
3293 pk: *mut libc::c_uchar,
3294 sk: *mut libc::c_uchar,
3295 ) -> libc::c_int;
3296 }
3297 extern "C" {
crypto_box_curve25519xchacha20poly1305_easy( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int3298 pub fn crypto_box_curve25519xchacha20poly1305_easy(
3299 c: *mut libc::c_uchar,
3300 m: *const libc::c_uchar,
3301 mlen: libc::c_ulonglong,
3302 n: *const libc::c_uchar,
3303 pk: *const libc::c_uchar,
3304 sk: *const libc::c_uchar,
3305 ) -> libc::c_int;
3306 }
3307 extern "C" {
crypto_box_curve25519xchacha20poly1305_open_easy( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int3308 pub fn crypto_box_curve25519xchacha20poly1305_open_easy(
3309 m: *mut libc::c_uchar,
3310 c: *const libc::c_uchar,
3311 clen: libc::c_ulonglong,
3312 n: *const libc::c_uchar,
3313 pk: *const libc::c_uchar,
3314 sk: *const libc::c_uchar,
3315 ) -> libc::c_int;
3316 }
3317 extern "C" {
crypto_box_curve25519xchacha20poly1305_detached( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int3318 pub fn crypto_box_curve25519xchacha20poly1305_detached(
3319 c: *mut libc::c_uchar,
3320 mac: *mut libc::c_uchar,
3321 m: *const libc::c_uchar,
3322 mlen: libc::c_ulonglong,
3323 n: *const libc::c_uchar,
3324 pk: *const libc::c_uchar,
3325 sk: *const libc::c_uchar,
3326 ) -> libc::c_int;
3327 }
3328 extern "C" {
crypto_box_curve25519xchacha20poly1305_open_detached( m: *mut libc::c_uchar, c: *const libc::c_uchar, mac: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int3329 pub fn crypto_box_curve25519xchacha20poly1305_open_detached(
3330 m: *mut libc::c_uchar,
3331 c: *const libc::c_uchar,
3332 mac: *const libc::c_uchar,
3333 clen: libc::c_ulonglong,
3334 n: *const libc::c_uchar,
3335 pk: *const libc::c_uchar,
3336 sk: *const libc::c_uchar,
3337 ) -> libc::c_int;
3338 }
3339 extern "C" {
crypto_box_curve25519xchacha20poly1305_beforenm( k: *mut libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int3340 pub fn crypto_box_curve25519xchacha20poly1305_beforenm(
3341 k: *mut libc::c_uchar,
3342 pk: *const libc::c_uchar,
3343 sk: *const libc::c_uchar,
3344 ) -> libc::c_int;
3345 }
3346 extern "C" {
crypto_box_curve25519xchacha20poly1305_easy_afternm( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3347 pub fn crypto_box_curve25519xchacha20poly1305_easy_afternm(
3348 c: *mut libc::c_uchar,
3349 m: *const libc::c_uchar,
3350 mlen: libc::c_ulonglong,
3351 n: *const libc::c_uchar,
3352 k: *const libc::c_uchar,
3353 ) -> libc::c_int;
3354 }
3355 extern "C" {
crypto_box_curve25519xchacha20poly1305_open_easy_afternm( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3356 pub fn crypto_box_curve25519xchacha20poly1305_open_easy_afternm(
3357 m: *mut libc::c_uchar,
3358 c: *const libc::c_uchar,
3359 clen: libc::c_ulonglong,
3360 n: *const libc::c_uchar,
3361 k: *const libc::c_uchar,
3362 ) -> libc::c_int;
3363 }
3364 extern "C" {
crypto_box_curve25519xchacha20poly1305_detached_afternm( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3365 pub fn crypto_box_curve25519xchacha20poly1305_detached_afternm(
3366 c: *mut libc::c_uchar,
3367 mac: *mut libc::c_uchar,
3368 m: *const libc::c_uchar,
3369 mlen: libc::c_ulonglong,
3370 n: *const libc::c_uchar,
3371 k: *const libc::c_uchar,
3372 ) -> libc::c_int;
3373 }
3374 extern "C" {
crypto_box_curve25519xchacha20poly1305_open_detached_afternm( m: *mut libc::c_uchar, c: *const libc::c_uchar, mac: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3375 pub fn crypto_box_curve25519xchacha20poly1305_open_detached_afternm(
3376 m: *mut libc::c_uchar,
3377 c: *const libc::c_uchar,
3378 mac: *const libc::c_uchar,
3379 clen: libc::c_ulonglong,
3380 n: *const libc::c_uchar,
3381 k: *const libc::c_uchar,
3382 ) -> libc::c_int;
3383 }
3384 extern "C" {
crypto_box_curve25519xchacha20poly1305_sealbytes() -> usize3385 pub fn crypto_box_curve25519xchacha20poly1305_sealbytes() -> usize;
3386 }
3387 extern "C" {
crypto_box_curve25519xchacha20poly1305_seal( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, pk: *const libc::c_uchar, ) -> libc::c_int3388 pub fn crypto_box_curve25519xchacha20poly1305_seal(
3389 c: *mut libc::c_uchar,
3390 m: *const libc::c_uchar,
3391 mlen: libc::c_ulonglong,
3392 pk: *const libc::c_uchar,
3393 ) -> libc::c_int;
3394 }
3395 extern "C" {
crypto_box_curve25519xchacha20poly1305_seal_open( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int3396 pub fn crypto_box_curve25519xchacha20poly1305_seal_open(
3397 m: *mut libc::c_uchar,
3398 c: *const libc::c_uchar,
3399 clen: libc::c_ulonglong,
3400 pk: *const libc::c_uchar,
3401 sk: *const libc::c_uchar,
3402 ) -> libc::c_int;
3403 }
3404 extern "C" {
crypto_core_ed25519_bytes() -> usize3405 pub fn crypto_core_ed25519_bytes() -> usize;
3406 }
3407 extern "C" {
crypto_core_ed25519_uniformbytes() -> usize3408 pub fn crypto_core_ed25519_uniformbytes() -> usize;
3409 }
3410 extern "C" {
crypto_core_ed25519_hashbytes() -> usize3411 pub fn crypto_core_ed25519_hashbytes() -> usize;
3412 }
3413 extern "C" {
crypto_core_ed25519_scalarbytes() -> usize3414 pub fn crypto_core_ed25519_scalarbytes() -> usize;
3415 }
3416 extern "C" {
crypto_core_ed25519_nonreducedscalarbytes() -> usize3417 pub fn crypto_core_ed25519_nonreducedscalarbytes() -> usize;
3418 }
3419 extern "C" {
crypto_core_ed25519_is_valid_point(p: *const libc::c_uchar) -> libc::c_int3420 pub fn crypto_core_ed25519_is_valid_point(p: *const libc::c_uchar) -> libc::c_int;
3421 }
3422 extern "C" {
crypto_core_ed25519_add( r: *mut libc::c_uchar, p: *const libc::c_uchar, q: *const libc::c_uchar, ) -> libc::c_int3423 pub fn crypto_core_ed25519_add(
3424 r: *mut libc::c_uchar,
3425 p: *const libc::c_uchar,
3426 q: *const libc::c_uchar,
3427 ) -> libc::c_int;
3428 }
3429 extern "C" {
crypto_core_ed25519_sub( r: *mut libc::c_uchar, p: *const libc::c_uchar, q: *const libc::c_uchar, ) -> libc::c_int3430 pub fn crypto_core_ed25519_sub(
3431 r: *mut libc::c_uchar,
3432 p: *const libc::c_uchar,
3433 q: *const libc::c_uchar,
3434 ) -> libc::c_int;
3435 }
3436 extern "C" {
crypto_core_ed25519_from_uniform( p: *mut libc::c_uchar, r: *const libc::c_uchar, ) -> libc::c_int3437 pub fn crypto_core_ed25519_from_uniform(
3438 p: *mut libc::c_uchar,
3439 r: *const libc::c_uchar,
3440 ) -> libc::c_int;
3441 }
3442 extern "C" {
crypto_core_ed25519_from_hash( p: *mut libc::c_uchar, h: *const libc::c_uchar, ) -> libc::c_int3443 pub fn crypto_core_ed25519_from_hash(
3444 p: *mut libc::c_uchar,
3445 h: *const libc::c_uchar,
3446 ) -> libc::c_int;
3447 }
3448 extern "C" {
crypto_core_ed25519_random(p: *mut libc::c_uchar)3449 pub fn crypto_core_ed25519_random(p: *mut libc::c_uchar);
3450 }
3451 extern "C" {
crypto_core_ed25519_scalar_random(r: *mut libc::c_uchar)3452 pub fn crypto_core_ed25519_scalar_random(r: *mut libc::c_uchar);
3453 }
3454 extern "C" {
crypto_core_ed25519_scalar_invert( recip: *mut libc::c_uchar, s: *const libc::c_uchar, ) -> libc::c_int3455 pub fn crypto_core_ed25519_scalar_invert(
3456 recip: *mut libc::c_uchar,
3457 s: *const libc::c_uchar,
3458 ) -> libc::c_int;
3459 }
3460 extern "C" {
crypto_core_ed25519_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar)3461 pub fn crypto_core_ed25519_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar);
3462 }
3463 extern "C" {
crypto_core_ed25519_scalar_complement(comp: *mut libc::c_uchar, s: *const libc::c_uchar)3464 pub fn crypto_core_ed25519_scalar_complement(comp: *mut libc::c_uchar, s: *const libc::c_uchar);
3465 }
3466 extern "C" {
crypto_core_ed25519_scalar_add( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3467 pub fn crypto_core_ed25519_scalar_add(
3468 z: *mut libc::c_uchar,
3469 x: *const libc::c_uchar,
3470 y: *const libc::c_uchar,
3471 );
3472 }
3473 extern "C" {
crypto_core_ed25519_scalar_sub( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3474 pub fn crypto_core_ed25519_scalar_sub(
3475 z: *mut libc::c_uchar,
3476 x: *const libc::c_uchar,
3477 y: *const libc::c_uchar,
3478 );
3479 }
3480 extern "C" {
crypto_core_ed25519_scalar_mul( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3481 pub fn crypto_core_ed25519_scalar_mul(
3482 z: *mut libc::c_uchar,
3483 x: *const libc::c_uchar,
3484 y: *const libc::c_uchar,
3485 );
3486 }
3487 extern "C" {
crypto_core_ed25519_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar)3488 pub fn crypto_core_ed25519_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar);
3489 }
3490 extern "C" {
crypto_core_ristretto255_bytes() -> usize3491 pub fn crypto_core_ristretto255_bytes() -> usize;
3492 }
3493 extern "C" {
crypto_core_ristretto255_hashbytes() -> usize3494 pub fn crypto_core_ristretto255_hashbytes() -> usize;
3495 }
3496 extern "C" {
crypto_core_ristretto255_scalarbytes() -> usize3497 pub fn crypto_core_ristretto255_scalarbytes() -> usize;
3498 }
3499 extern "C" {
crypto_core_ristretto255_nonreducedscalarbytes() -> usize3500 pub fn crypto_core_ristretto255_nonreducedscalarbytes() -> usize;
3501 }
3502 extern "C" {
crypto_core_ristretto255_is_valid_point(p: *const libc::c_uchar) -> libc::c_int3503 pub fn crypto_core_ristretto255_is_valid_point(p: *const libc::c_uchar) -> libc::c_int;
3504 }
3505 extern "C" {
crypto_core_ristretto255_add( r: *mut libc::c_uchar, p: *const libc::c_uchar, q: *const libc::c_uchar, ) -> libc::c_int3506 pub fn crypto_core_ristretto255_add(
3507 r: *mut libc::c_uchar,
3508 p: *const libc::c_uchar,
3509 q: *const libc::c_uchar,
3510 ) -> libc::c_int;
3511 }
3512 extern "C" {
crypto_core_ristretto255_sub( r: *mut libc::c_uchar, p: *const libc::c_uchar, q: *const libc::c_uchar, ) -> libc::c_int3513 pub fn crypto_core_ristretto255_sub(
3514 r: *mut libc::c_uchar,
3515 p: *const libc::c_uchar,
3516 q: *const libc::c_uchar,
3517 ) -> libc::c_int;
3518 }
3519 extern "C" {
crypto_core_ristretto255_from_hash( p: *mut libc::c_uchar, r: *const libc::c_uchar, ) -> libc::c_int3520 pub fn crypto_core_ristretto255_from_hash(
3521 p: *mut libc::c_uchar,
3522 r: *const libc::c_uchar,
3523 ) -> libc::c_int;
3524 }
3525 extern "C" {
crypto_core_ristretto255_random(p: *mut libc::c_uchar)3526 pub fn crypto_core_ristretto255_random(p: *mut libc::c_uchar);
3527 }
3528 extern "C" {
crypto_core_ristretto255_scalar_random(r: *mut libc::c_uchar)3529 pub fn crypto_core_ristretto255_scalar_random(r: *mut libc::c_uchar);
3530 }
3531 extern "C" {
crypto_core_ristretto255_scalar_invert( recip: *mut libc::c_uchar, s: *const libc::c_uchar, ) -> libc::c_int3532 pub fn crypto_core_ristretto255_scalar_invert(
3533 recip: *mut libc::c_uchar,
3534 s: *const libc::c_uchar,
3535 ) -> libc::c_int;
3536 }
3537 extern "C" {
crypto_core_ristretto255_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar)3538 pub fn crypto_core_ristretto255_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar);
3539 }
3540 extern "C" {
crypto_core_ristretto255_scalar_complement( comp: *mut libc::c_uchar, s: *const libc::c_uchar, )3541 pub fn crypto_core_ristretto255_scalar_complement(
3542 comp: *mut libc::c_uchar,
3543 s: *const libc::c_uchar,
3544 );
3545 }
3546 extern "C" {
crypto_core_ristretto255_scalar_add( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3547 pub fn crypto_core_ristretto255_scalar_add(
3548 z: *mut libc::c_uchar,
3549 x: *const libc::c_uchar,
3550 y: *const libc::c_uchar,
3551 );
3552 }
3553 extern "C" {
crypto_core_ristretto255_scalar_sub( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3554 pub fn crypto_core_ristretto255_scalar_sub(
3555 z: *mut libc::c_uchar,
3556 x: *const libc::c_uchar,
3557 y: *const libc::c_uchar,
3558 );
3559 }
3560 extern "C" {
crypto_core_ristretto255_scalar_mul( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3561 pub fn crypto_core_ristretto255_scalar_mul(
3562 z: *mut libc::c_uchar,
3563 x: *const libc::c_uchar,
3564 y: *const libc::c_uchar,
3565 );
3566 }
3567 extern "C" {
crypto_core_ristretto255_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar)3568 pub fn crypto_core_ristretto255_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar);
3569 }
3570 extern "C" {
crypto_scalarmult_ed25519_bytes() -> usize3571 pub fn crypto_scalarmult_ed25519_bytes() -> usize;
3572 }
3573 extern "C" {
crypto_scalarmult_ed25519_scalarbytes() -> usize3574 pub fn crypto_scalarmult_ed25519_scalarbytes() -> usize;
3575 }
3576 extern "C" {
crypto_scalarmult_ed25519( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int3577 pub fn crypto_scalarmult_ed25519(
3578 q: *mut libc::c_uchar,
3579 n: *const libc::c_uchar,
3580 p: *const libc::c_uchar,
3581 ) -> libc::c_int;
3582 }
3583 extern "C" {
crypto_scalarmult_ed25519_noclamp( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int3584 pub fn crypto_scalarmult_ed25519_noclamp(
3585 q: *mut libc::c_uchar,
3586 n: *const libc::c_uchar,
3587 p: *const libc::c_uchar,
3588 ) -> libc::c_int;
3589 }
3590 extern "C" {
crypto_scalarmult_ed25519_base( q: *mut libc::c_uchar, n: *const libc::c_uchar, ) -> libc::c_int3591 pub fn crypto_scalarmult_ed25519_base(
3592 q: *mut libc::c_uchar,
3593 n: *const libc::c_uchar,
3594 ) -> libc::c_int;
3595 }
3596 extern "C" {
crypto_scalarmult_ed25519_base_noclamp( q: *mut libc::c_uchar, n: *const libc::c_uchar, ) -> libc::c_int3597 pub fn crypto_scalarmult_ed25519_base_noclamp(
3598 q: *mut libc::c_uchar,
3599 n: *const libc::c_uchar,
3600 ) -> libc::c_int;
3601 }
3602 extern "C" {
crypto_scalarmult_ristretto255_bytes() -> usize3603 pub fn crypto_scalarmult_ristretto255_bytes() -> usize;
3604 }
3605 extern "C" {
crypto_scalarmult_ristretto255_scalarbytes() -> usize3606 pub fn crypto_scalarmult_ristretto255_scalarbytes() -> usize;
3607 }
3608 extern "C" {
crypto_scalarmult_ristretto255( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int3609 pub fn crypto_scalarmult_ristretto255(
3610 q: *mut libc::c_uchar,
3611 n: *const libc::c_uchar,
3612 p: *const libc::c_uchar,
3613 ) -> libc::c_int;
3614 }
3615 extern "C" {
crypto_scalarmult_ristretto255_base( q: *mut libc::c_uchar, n: *const libc::c_uchar, ) -> libc::c_int3616 pub fn crypto_scalarmult_ristretto255_base(
3617 q: *mut libc::c_uchar,
3618 n: *const libc::c_uchar,
3619 ) -> libc::c_int;
3620 }
3621 extern "C" {
crypto_secretbox_xchacha20poly1305_keybytes() -> usize3622 pub fn crypto_secretbox_xchacha20poly1305_keybytes() -> usize;
3623 }
3624 extern "C" {
crypto_secretbox_xchacha20poly1305_noncebytes() -> usize3625 pub fn crypto_secretbox_xchacha20poly1305_noncebytes() -> usize;
3626 }
3627 extern "C" {
crypto_secretbox_xchacha20poly1305_macbytes() -> usize3628 pub fn crypto_secretbox_xchacha20poly1305_macbytes() -> usize;
3629 }
3630 extern "C" {
crypto_secretbox_xchacha20poly1305_messagebytes_max() -> usize3631 pub fn crypto_secretbox_xchacha20poly1305_messagebytes_max() -> usize;
3632 }
3633 extern "C" {
crypto_secretbox_xchacha20poly1305_easy( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3634 pub fn crypto_secretbox_xchacha20poly1305_easy(
3635 c: *mut libc::c_uchar,
3636 m: *const libc::c_uchar,
3637 mlen: libc::c_ulonglong,
3638 n: *const libc::c_uchar,
3639 k: *const libc::c_uchar,
3640 ) -> libc::c_int;
3641 }
3642 extern "C" {
crypto_secretbox_xchacha20poly1305_open_easy( m: *mut libc::c_uchar, c: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3643 pub fn crypto_secretbox_xchacha20poly1305_open_easy(
3644 m: *mut libc::c_uchar,
3645 c: *const libc::c_uchar,
3646 clen: libc::c_ulonglong,
3647 n: *const libc::c_uchar,
3648 k: *const libc::c_uchar,
3649 ) -> libc::c_int;
3650 }
3651 extern "C" {
crypto_secretbox_xchacha20poly1305_detached( c: *mut libc::c_uchar, mac: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3652 pub fn crypto_secretbox_xchacha20poly1305_detached(
3653 c: *mut libc::c_uchar,
3654 mac: *mut libc::c_uchar,
3655 m: *const libc::c_uchar,
3656 mlen: libc::c_ulonglong,
3657 n: *const libc::c_uchar,
3658 k: *const libc::c_uchar,
3659 ) -> libc::c_int;
3660 }
3661 extern "C" {
crypto_secretbox_xchacha20poly1305_open_detached( m: *mut libc::c_uchar, c: *const libc::c_uchar, mac: *const libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3662 pub fn crypto_secretbox_xchacha20poly1305_open_detached(
3663 m: *mut libc::c_uchar,
3664 c: *const libc::c_uchar,
3665 mac: *const libc::c_uchar,
3666 clen: libc::c_ulonglong,
3667 n: *const libc::c_uchar,
3668 k: *const libc::c_uchar,
3669 ) -> libc::c_int;
3670 }
3671 extern "C" {
crypto_pwhash_scryptsalsa208sha256_bytes_min() -> usize3672 pub fn crypto_pwhash_scryptsalsa208sha256_bytes_min() -> usize;
3673 }
3674 extern "C" {
crypto_pwhash_scryptsalsa208sha256_bytes_max() -> usize3675 pub fn crypto_pwhash_scryptsalsa208sha256_bytes_max() -> usize;
3676 }
3677 extern "C" {
crypto_pwhash_scryptsalsa208sha256_passwd_min() -> usize3678 pub fn crypto_pwhash_scryptsalsa208sha256_passwd_min() -> usize;
3679 }
3680 extern "C" {
crypto_pwhash_scryptsalsa208sha256_passwd_max() -> usize3681 pub fn crypto_pwhash_scryptsalsa208sha256_passwd_max() -> usize;
3682 }
3683 extern "C" {
crypto_pwhash_scryptsalsa208sha256_saltbytes() -> usize3684 pub fn crypto_pwhash_scryptsalsa208sha256_saltbytes() -> usize;
3685 }
3686 extern "C" {
crypto_pwhash_scryptsalsa208sha256_strbytes() -> usize3687 pub fn crypto_pwhash_scryptsalsa208sha256_strbytes() -> usize;
3688 }
3689 extern "C" {
crypto_pwhash_scryptsalsa208sha256_strprefix() -> *const libc::c_char3690 pub fn crypto_pwhash_scryptsalsa208sha256_strprefix() -> *const libc::c_char;
3691 }
3692 extern "C" {
crypto_pwhash_scryptsalsa208sha256_opslimit_min() -> usize3693 pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_min() -> usize;
3694 }
3695 extern "C" {
crypto_pwhash_scryptsalsa208sha256_opslimit_max() -> usize3696 pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_max() -> usize;
3697 }
3698 extern "C" {
crypto_pwhash_scryptsalsa208sha256_memlimit_min() -> usize3699 pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_min() -> usize;
3700 }
3701 extern "C" {
crypto_pwhash_scryptsalsa208sha256_memlimit_max() -> usize3702 pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_max() -> usize;
3703 }
3704 extern "C" {
crypto_pwhash_scryptsalsa208sha256_opslimit_interactive() -> usize3705 pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_interactive() -> usize;
3706 }
3707 extern "C" {
crypto_pwhash_scryptsalsa208sha256_memlimit_interactive() -> usize3708 pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_interactive() -> usize;
3709 }
3710 extern "C" {
crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive() -> usize3711 pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive() -> usize;
3712 }
3713 extern "C" {
crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive() -> usize3714 pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive() -> usize;
3715 }
3716 extern "C" {
crypto_pwhash_scryptsalsa208sha256( out: *mut libc::c_uchar, outlen: libc::c_ulonglong, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, salt: *const libc::c_uchar, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int3717 pub fn crypto_pwhash_scryptsalsa208sha256(
3718 out: *mut libc::c_uchar,
3719 outlen: libc::c_ulonglong,
3720 passwd: *const libc::c_char,
3721 passwdlen: libc::c_ulonglong,
3722 salt: *const libc::c_uchar,
3723 opslimit: libc::c_ulonglong,
3724 memlimit: usize,
3725 ) -> libc::c_int;
3726 }
3727 extern "C" {
crypto_pwhash_scryptsalsa208sha256_str( out: *mut libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int3728 pub fn crypto_pwhash_scryptsalsa208sha256_str(
3729 out: *mut libc::c_char,
3730 passwd: *const libc::c_char,
3731 passwdlen: libc::c_ulonglong,
3732 opslimit: libc::c_ulonglong,
3733 memlimit: usize,
3734 ) -> libc::c_int;
3735 }
3736 extern "C" {
crypto_pwhash_scryptsalsa208sha256_str_verify( str_: *const libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, ) -> libc::c_int3737 pub fn crypto_pwhash_scryptsalsa208sha256_str_verify(
3738 str_: *const libc::c_char,
3739 passwd: *const libc::c_char,
3740 passwdlen: libc::c_ulonglong,
3741 ) -> libc::c_int;
3742 }
3743 extern "C" {
crypto_pwhash_scryptsalsa208sha256_ll( passwd: *const u8, passwdlen: usize, salt: *const u8, saltlen: usize, N: u64, r: u32, p: u32, buf: *mut u8, buflen: usize, ) -> libc::c_int3744 pub fn crypto_pwhash_scryptsalsa208sha256_ll(
3745 passwd: *const u8,
3746 passwdlen: usize,
3747 salt: *const u8,
3748 saltlen: usize,
3749 N: u64,
3750 r: u32,
3751 p: u32,
3752 buf: *mut u8,
3753 buflen: usize,
3754 ) -> libc::c_int;
3755 }
3756 extern "C" {
crypto_pwhash_scryptsalsa208sha256_str_needs_rehash( str_: *const libc::c_char, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int3757 pub fn crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(
3758 str_: *const libc::c_char,
3759 opslimit: libc::c_ulonglong,
3760 memlimit: usize,
3761 ) -> libc::c_int;
3762 }
3763 extern "C" {
crypto_stream_salsa2012_keybytes() -> usize3764 pub fn crypto_stream_salsa2012_keybytes() -> usize;
3765 }
3766 extern "C" {
crypto_stream_salsa2012_noncebytes() -> usize3767 pub fn crypto_stream_salsa2012_noncebytes() -> usize;
3768 }
3769 extern "C" {
crypto_stream_salsa2012_messagebytes_max() -> usize3770 pub fn crypto_stream_salsa2012_messagebytes_max() -> usize;
3771 }
3772 extern "C" {
crypto_stream_salsa2012( c: *mut libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3773 pub fn crypto_stream_salsa2012(
3774 c: *mut libc::c_uchar,
3775 clen: libc::c_ulonglong,
3776 n: *const libc::c_uchar,
3777 k: *const libc::c_uchar,
3778 ) -> libc::c_int;
3779 }
3780 extern "C" {
crypto_stream_salsa2012_xor( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3781 pub fn crypto_stream_salsa2012_xor(
3782 c: *mut libc::c_uchar,
3783 m: *const libc::c_uchar,
3784 mlen: libc::c_ulonglong,
3785 n: *const libc::c_uchar,
3786 k: *const libc::c_uchar,
3787 ) -> libc::c_int;
3788 }
3789 extern "C" {
crypto_stream_salsa2012_keygen(k: *mut libc::c_uchar)3790 pub fn crypto_stream_salsa2012_keygen(k: *mut libc::c_uchar);
3791 }
3792 extern "C" {
crypto_stream_salsa208_keybytes() -> usize3793 pub fn crypto_stream_salsa208_keybytes() -> usize;
3794 }
3795 extern "C" {
crypto_stream_salsa208_noncebytes() -> usize3796 pub fn crypto_stream_salsa208_noncebytes() -> usize;
3797 }
3798 extern "C" {
crypto_stream_salsa208_messagebytes_max() -> usize3799 pub fn crypto_stream_salsa208_messagebytes_max() -> usize;
3800 }
3801 extern "C" {
crypto_stream_salsa208( c: *mut libc::c_uchar, clen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3802 pub fn crypto_stream_salsa208(
3803 c: *mut libc::c_uchar,
3804 clen: libc::c_ulonglong,
3805 n: *const libc::c_uchar,
3806 k: *const libc::c_uchar,
3807 ) -> libc::c_int;
3808 }
3809 extern "C" {
crypto_stream_salsa208_xor( c: *mut libc::c_uchar, m: *const libc::c_uchar, mlen: libc::c_ulonglong, n: *const libc::c_uchar, k: *const libc::c_uchar, ) -> libc::c_int3810 pub fn crypto_stream_salsa208_xor(
3811 c: *mut libc::c_uchar,
3812 m: *const libc::c_uchar,
3813 mlen: libc::c_ulonglong,
3814 n: *const libc::c_uchar,
3815 k: *const libc::c_uchar,
3816 ) -> libc::c_int;
3817 }
3818 extern "C" {
crypto_stream_salsa208_keygen(k: *mut libc::c_uchar)3819 pub fn crypto_stream_salsa208_keygen(k: *mut libc::c_uchar);
3820 }
3821