1 /* automatically generated by rust-bindgen */ 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 pub type __uint8_t = libc::c_uchar; 268 pub type __uint32_t = libc::c_uint; 269 pub type __uint64_t = libc::c_ulong; 270 extern "C" { sodium_version_string() -> *const libc::c_char271 pub fn sodium_version_string() -> *const libc::c_char; 272 } 273 extern "C" { sodium_library_version_major() -> libc::c_int274 pub fn sodium_library_version_major() -> libc::c_int; 275 } 276 extern "C" { sodium_library_version_minor() -> libc::c_int277 pub fn sodium_library_version_minor() -> libc::c_int; 278 } 279 extern "C" { sodium_library_minimal() -> libc::c_int280 pub fn sodium_library_minimal() -> libc::c_int; 281 } 282 extern "C" { sodium_init() -> libc::c_int283 pub fn sodium_init() -> libc::c_int; 284 } 285 extern "C" { sodium_set_misuse_handler( handler: ::core::option::Option<unsafe extern "C" fn()>, ) -> libc::c_int286 pub fn sodium_set_misuse_handler( 287 handler: ::core::option::Option<unsafe extern "C" fn()>, 288 ) -> libc::c_int; 289 } 290 extern "C" { sodium_misuse()291 pub fn sodium_misuse(); 292 } 293 extern "C" { crypto_aead_aes256gcm_is_available() -> libc::c_int294 pub fn crypto_aead_aes256gcm_is_available() -> libc::c_int; 295 } 296 extern "C" { crypto_aead_aes256gcm_keybytes() -> usize297 pub fn crypto_aead_aes256gcm_keybytes() -> usize; 298 } 299 extern "C" { crypto_aead_aes256gcm_nsecbytes() -> usize300 pub fn crypto_aead_aes256gcm_nsecbytes() -> usize; 301 } 302 extern "C" { crypto_aead_aes256gcm_npubbytes() -> usize303 pub fn crypto_aead_aes256gcm_npubbytes() -> usize; 304 } 305 extern "C" { crypto_aead_aes256gcm_abytes() -> usize306 pub fn crypto_aead_aes256gcm_abytes() -> usize; 307 } 308 extern "C" { crypto_aead_aes256gcm_messagebytes_max() -> usize309 pub fn crypto_aead_aes256gcm_messagebytes_max() -> usize; 310 } 311 #[repr(C)] 312 #[repr(align(16))] 313 #[derive(Copy, Clone)] 314 pub struct crypto_aead_aes256gcm_state_ { 315 pub opaque: [libc::c_uchar; 512usize], 316 } 317 pub type crypto_aead_aes256gcm_state = crypto_aead_aes256gcm_state_; 318 extern "C" { crypto_aead_aes256gcm_statebytes() -> usize319 pub fn crypto_aead_aes256gcm_statebytes() -> usize; 320 } 321 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_int322 pub fn crypto_aead_aes256gcm_encrypt( 323 c: *mut libc::c_uchar, 324 clen_p: *mut libc::c_ulonglong, 325 m: *const libc::c_uchar, 326 mlen: libc::c_ulonglong, 327 ad: *const libc::c_uchar, 328 adlen: libc::c_ulonglong, 329 nsec: *const libc::c_uchar, 330 npub: *const libc::c_uchar, 331 k: *const libc::c_uchar, 332 ) -> libc::c_int; 333 } 334 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_int335 pub fn crypto_aead_aes256gcm_decrypt( 336 m: *mut libc::c_uchar, 337 mlen_p: *mut libc::c_ulonglong, 338 nsec: *mut libc::c_uchar, 339 c: *const libc::c_uchar, 340 clen: libc::c_ulonglong, 341 ad: *const libc::c_uchar, 342 adlen: libc::c_ulonglong, 343 npub: *const libc::c_uchar, 344 k: *const libc::c_uchar, 345 ) -> libc::c_int; 346 } 347 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_int348 pub fn crypto_aead_aes256gcm_encrypt_detached( 349 c: *mut libc::c_uchar, 350 mac: *mut libc::c_uchar, 351 maclen_p: *mut libc::c_ulonglong, 352 m: *const libc::c_uchar, 353 mlen: libc::c_ulonglong, 354 ad: *const libc::c_uchar, 355 adlen: libc::c_ulonglong, 356 nsec: *const libc::c_uchar, 357 npub: *const libc::c_uchar, 358 k: *const libc::c_uchar, 359 ) -> libc::c_int; 360 } 361 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_int362 pub fn crypto_aead_aes256gcm_decrypt_detached( 363 m: *mut libc::c_uchar, 364 nsec: *mut libc::c_uchar, 365 c: *const libc::c_uchar, 366 clen: libc::c_ulonglong, 367 mac: *const libc::c_uchar, 368 ad: *const libc::c_uchar, 369 adlen: libc::c_ulonglong, 370 npub: *const libc::c_uchar, 371 k: *const libc::c_uchar, 372 ) -> libc::c_int; 373 } 374 extern "C" { crypto_aead_aes256gcm_beforenm( ctx_: *mut crypto_aead_aes256gcm_state, k: *const libc::c_uchar, ) -> libc::c_int375 pub fn crypto_aead_aes256gcm_beforenm( 376 ctx_: *mut crypto_aead_aes256gcm_state, 377 k: *const libc::c_uchar, 378 ) -> libc::c_int; 379 } 380 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_int381 pub fn crypto_aead_aes256gcm_encrypt_afternm( 382 c: *mut libc::c_uchar, 383 clen_p: *mut libc::c_ulonglong, 384 m: *const libc::c_uchar, 385 mlen: libc::c_ulonglong, 386 ad: *const libc::c_uchar, 387 adlen: libc::c_ulonglong, 388 nsec: *const libc::c_uchar, 389 npub: *const libc::c_uchar, 390 ctx_: *const crypto_aead_aes256gcm_state, 391 ) -> libc::c_int; 392 } 393 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_int394 pub fn crypto_aead_aes256gcm_decrypt_afternm( 395 m: *mut libc::c_uchar, 396 mlen_p: *mut libc::c_ulonglong, 397 nsec: *mut libc::c_uchar, 398 c: *const libc::c_uchar, 399 clen: libc::c_ulonglong, 400 ad: *const libc::c_uchar, 401 adlen: libc::c_ulonglong, 402 npub: *const libc::c_uchar, 403 ctx_: *const crypto_aead_aes256gcm_state, 404 ) -> libc::c_int; 405 } 406 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_int407 pub fn crypto_aead_aes256gcm_encrypt_detached_afternm( 408 c: *mut libc::c_uchar, 409 mac: *mut libc::c_uchar, 410 maclen_p: *mut libc::c_ulonglong, 411 m: *const libc::c_uchar, 412 mlen: libc::c_ulonglong, 413 ad: *const libc::c_uchar, 414 adlen: libc::c_ulonglong, 415 nsec: *const libc::c_uchar, 416 npub: *const libc::c_uchar, 417 ctx_: *const crypto_aead_aes256gcm_state, 418 ) -> libc::c_int; 419 } 420 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_int421 pub fn crypto_aead_aes256gcm_decrypt_detached_afternm( 422 m: *mut libc::c_uchar, 423 nsec: *mut libc::c_uchar, 424 c: *const libc::c_uchar, 425 clen: libc::c_ulonglong, 426 mac: *const libc::c_uchar, 427 ad: *const libc::c_uchar, 428 adlen: libc::c_ulonglong, 429 npub: *const libc::c_uchar, 430 ctx_: *const crypto_aead_aes256gcm_state, 431 ) -> libc::c_int; 432 } 433 extern "C" { crypto_aead_aes256gcm_keygen(k: *mut libc::c_uchar)434 pub fn crypto_aead_aes256gcm_keygen(k: *mut libc::c_uchar); 435 } 436 extern "C" { crypto_aead_chacha20poly1305_ietf_keybytes() -> usize437 pub fn crypto_aead_chacha20poly1305_ietf_keybytes() -> usize; 438 } 439 extern "C" { crypto_aead_chacha20poly1305_ietf_nsecbytes() -> usize440 pub fn crypto_aead_chacha20poly1305_ietf_nsecbytes() -> usize; 441 } 442 extern "C" { crypto_aead_chacha20poly1305_ietf_npubbytes() -> usize443 pub fn crypto_aead_chacha20poly1305_ietf_npubbytes() -> usize; 444 } 445 extern "C" { crypto_aead_chacha20poly1305_ietf_abytes() -> usize446 pub fn crypto_aead_chacha20poly1305_ietf_abytes() -> usize; 447 } 448 extern "C" { crypto_aead_chacha20poly1305_ietf_messagebytes_max() -> usize449 pub fn crypto_aead_chacha20poly1305_ietf_messagebytes_max() -> usize; 450 } 451 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_int452 pub fn crypto_aead_chacha20poly1305_ietf_encrypt( 453 c: *mut libc::c_uchar, 454 clen_p: *mut libc::c_ulonglong, 455 m: *const libc::c_uchar, 456 mlen: libc::c_ulonglong, 457 ad: *const libc::c_uchar, 458 adlen: libc::c_ulonglong, 459 nsec: *const libc::c_uchar, 460 npub: *const libc::c_uchar, 461 k: *const libc::c_uchar, 462 ) -> libc::c_int; 463 } 464 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_int465 pub fn crypto_aead_chacha20poly1305_ietf_decrypt( 466 m: *mut libc::c_uchar, 467 mlen_p: *mut libc::c_ulonglong, 468 nsec: *mut libc::c_uchar, 469 c: *const libc::c_uchar, 470 clen: libc::c_ulonglong, 471 ad: *const libc::c_uchar, 472 adlen: libc::c_ulonglong, 473 npub: *const libc::c_uchar, 474 k: *const libc::c_uchar, 475 ) -> libc::c_int; 476 } 477 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_int478 pub fn crypto_aead_chacha20poly1305_ietf_encrypt_detached( 479 c: *mut libc::c_uchar, 480 mac: *mut libc::c_uchar, 481 maclen_p: *mut libc::c_ulonglong, 482 m: *const libc::c_uchar, 483 mlen: libc::c_ulonglong, 484 ad: *const libc::c_uchar, 485 adlen: libc::c_ulonglong, 486 nsec: *const libc::c_uchar, 487 npub: *const libc::c_uchar, 488 k: *const libc::c_uchar, 489 ) -> libc::c_int; 490 } 491 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_int492 pub fn crypto_aead_chacha20poly1305_ietf_decrypt_detached( 493 m: *mut libc::c_uchar, 494 nsec: *mut libc::c_uchar, 495 c: *const libc::c_uchar, 496 clen: libc::c_ulonglong, 497 mac: *const libc::c_uchar, 498 ad: *const libc::c_uchar, 499 adlen: libc::c_ulonglong, 500 npub: *const libc::c_uchar, 501 k: *const libc::c_uchar, 502 ) -> libc::c_int; 503 } 504 extern "C" { crypto_aead_chacha20poly1305_ietf_keygen(k: *mut libc::c_uchar)505 pub fn crypto_aead_chacha20poly1305_ietf_keygen(k: *mut libc::c_uchar); 506 } 507 extern "C" { crypto_aead_chacha20poly1305_keybytes() -> usize508 pub fn crypto_aead_chacha20poly1305_keybytes() -> usize; 509 } 510 extern "C" { crypto_aead_chacha20poly1305_nsecbytes() -> usize511 pub fn crypto_aead_chacha20poly1305_nsecbytes() -> usize; 512 } 513 extern "C" { crypto_aead_chacha20poly1305_npubbytes() -> usize514 pub fn crypto_aead_chacha20poly1305_npubbytes() -> usize; 515 } 516 extern "C" { crypto_aead_chacha20poly1305_abytes() -> usize517 pub fn crypto_aead_chacha20poly1305_abytes() -> usize; 518 } 519 extern "C" { crypto_aead_chacha20poly1305_messagebytes_max() -> usize520 pub fn crypto_aead_chacha20poly1305_messagebytes_max() -> usize; 521 } 522 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_int523 pub fn crypto_aead_chacha20poly1305_encrypt( 524 c: *mut libc::c_uchar, 525 clen_p: *mut libc::c_ulonglong, 526 m: *const libc::c_uchar, 527 mlen: libc::c_ulonglong, 528 ad: *const libc::c_uchar, 529 adlen: libc::c_ulonglong, 530 nsec: *const libc::c_uchar, 531 npub: *const libc::c_uchar, 532 k: *const libc::c_uchar, 533 ) -> libc::c_int; 534 } 535 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_int536 pub fn crypto_aead_chacha20poly1305_decrypt( 537 m: *mut libc::c_uchar, 538 mlen_p: *mut libc::c_ulonglong, 539 nsec: *mut libc::c_uchar, 540 c: *const libc::c_uchar, 541 clen: libc::c_ulonglong, 542 ad: *const libc::c_uchar, 543 adlen: libc::c_ulonglong, 544 npub: *const libc::c_uchar, 545 k: *const libc::c_uchar, 546 ) -> libc::c_int; 547 } 548 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_int549 pub fn crypto_aead_chacha20poly1305_encrypt_detached( 550 c: *mut libc::c_uchar, 551 mac: *mut libc::c_uchar, 552 maclen_p: *mut libc::c_ulonglong, 553 m: *const libc::c_uchar, 554 mlen: libc::c_ulonglong, 555 ad: *const libc::c_uchar, 556 adlen: libc::c_ulonglong, 557 nsec: *const libc::c_uchar, 558 npub: *const libc::c_uchar, 559 k: *const libc::c_uchar, 560 ) -> libc::c_int; 561 } 562 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_int563 pub fn crypto_aead_chacha20poly1305_decrypt_detached( 564 m: *mut libc::c_uchar, 565 nsec: *mut libc::c_uchar, 566 c: *const libc::c_uchar, 567 clen: libc::c_ulonglong, 568 mac: *const libc::c_uchar, 569 ad: *const libc::c_uchar, 570 adlen: libc::c_ulonglong, 571 npub: *const libc::c_uchar, 572 k: *const libc::c_uchar, 573 ) -> libc::c_int; 574 } 575 extern "C" { crypto_aead_chacha20poly1305_keygen(k: *mut libc::c_uchar)576 pub fn crypto_aead_chacha20poly1305_keygen(k: *mut libc::c_uchar); 577 } 578 extern "C" { crypto_aead_xchacha20poly1305_ietf_keybytes() -> usize579 pub fn crypto_aead_xchacha20poly1305_ietf_keybytes() -> usize; 580 } 581 extern "C" { crypto_aead_xchacha20poly1305_ietf_nsecbytes() -> usize582 pub fn crypto_aead_xchacha20poly1305_ietf_nsecbytes() -> usize; 583 } 584 extern "C" { crypto_aead_xchacha20poly1305_ietf_npubbytes() -> usize585 pub fn crypto_aead_xchacha20poly1305_ietf_npubbytes() -> usize; 586 } 587 extern "C" { crypto_aead_xchacha20poly1305_ietf_abytes() -> usize588 pub fn crypto_aead_xchacha20poly1305_ietf_abytes() -> usize; 589 } 590 extern "C" { crypto_aead_xchacha20poly1305_ietf_messagebytes_max() -> usize591 pub fn crypto_aead_xchacha20poly1305_ietf_messagebytes_max() -> usize; 592 } 593 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_int594 pub fn crypto_aead_xchacha20poly1305_ietf_encrypt( 595 c: *mut libc::c_uchar, 596 clen_p: *mut libc::c_ulonglong, 597 m: *const libc::c_uchar, 598 mlen: libc::c_ulonglong, 599 ad: *const libc::c_uchar, 600 adlen: libc::c_ulonglong, 601 nsec: *const libc::c_uchar, 602 npub: *const libc::c_uchar, 603 k: *const libc::c_uchar, 604 ) -> libc::c_int; 605 } 606 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_int607 pub fn crypto_aead_xchacha20poly1305_ietf_decrypt( 608 m: *mut libc::c_uchar, 609 mlen_p: *mut libc::c_ulonglong, 610 nsec: *mut libc::c_uchar, 611 c: *const libc::c_uchar, 612 clen: libc::c_ulonglong, 613 ad: *const libc::c_uchar, 614 adlen: libc::c_ulonglong, 615 npub: *const libc::c_uchar, 616 k: *const libc::c_uchar, 617 ) -> libc::c_int; 618 } 619 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_int620 pub fn crypto_aead_xchacha20poly1305_ietf_encrypt_detached( 621 c: *mut libc::c_uchar, 622 mac: *mut libc::c_uchar, 623 maclen_p: *mut libc::c_ulonglong, 624 m: *const libc::c_uchar, 625 mlen: libc::c_ulonglong, 626 ad: *const libc::c_uchar, 627 adlen: libc::c_ulonglong, 628 nsec: *const libc::c_uchar, 629 npub: *const libc::c_uchar, 630 k: *const libc::c_uchar, 631 ) -> libc::c_int; 632 } 633 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_int634 pub fn crypto_aead_xchacha20poly1305_ietf_decrypt_detached( 635 m: *mut libc::c_uchar, 636 nsec: *mut libc::c_uchar, 637 c: *const libc::c_uchar, 638 clen: libc::c_ulonglong, 639 mac: *const libc::c_uchar, 640 ad: *const libc::c_uchar, 641 adlen: libc::c_ulonglong, 642 npub: *const libc::c_uchar, 643 k: *const libc::c_uchar, 644 ) -> libc::c_int; 645 } 646 extern "C" { crypto_aead_xchacha20poly1305_ietf_keygen(k: *mut libc::c_uchar)647 pub fn crypto_aead_xchacha20poly1305_ietf_keygen(k: *mut libc::c_uchar); 648 } 649 #[repr(C)] 650 #[derive(Copy, Clone)] 651 pub struct crypto_hash_sha512_state { 652 pub state: [u64; 8usize], 653 pub count: [u64; 2usize], 654 pub buf: [u8; 128usize], 655 } 656 extern "C" { crypto_hash_sha512_statebytes() -> usize657 pub fn crypto_hash_sha512_statebytes() -> usize; 658 } 659 extern "C" { crypto_hash_sha512_bytes() -> usize660 pub fn crypto_hash_sha512_bytes() -> usize; 661 } 662 extern "C" { crypto_hash_sha512( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int663 pub fn crypto_hash_sha512( 664 out: *mut libc::c_uchar, 665 in_: *const libc::c_uchar, 666 inlen: libc::c_ulonglong, 667 ) -> libc::c_int; 668 } 669 extern "C" { crypto_hash_sha512_init(state: *mut crypto_hash_sha512_state) -> libc::c_int670 pub fn crypto_hash_sha512_init(state: *mut crypto_hash_sha512_state) -> libc::c_int; 671 } 672 extern "C" { crypto_hash_sha512_update( state: *mut crypto_hash_sha512_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int673 pub fn crypto_hash_sha512_update( 674 state: *mut crypto_hash_sha512_state, 675 in_: *const libc::c_uchar, 676 inlen: libc::c_ulonglong, 677 ) -> libc::c_int; 678 } 679 extern "C" { crypto_hash_sha512_final( state: *mut crypto_hash_sha512_state, out: *mut libc::c_uchar, ) -> libc::c_int680 pub fn crypto_hash_sha512_final( 681 state: *mut crypto_hash_sha512_state, 682 out: *mut libc::c_uchar, 683 ) -> libc::c_int; 684 } 685 extern "C" { crypto_auth_hmacsha512_bytes() -> usize686 pub fn crypto_auth_hmacsha512_bytes() -> usize; 687 } 688 extern "C" { crypto_auth_hmacsha512_keybytes() -> usize689 pub fn crypto_auth_hmacsha512_keybytes() -> usize; 690 } 691 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_int692 pub fn crypto_auth_hmacsha512( 693 out: *mut libc::c_uchar, 694 in_: *const libc::c_uchar, 695 inlen: libc::c_ulonglong, 696 k: *const libc::c_uchar, 697 ) -> libc::c_int; 698 } 699 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_int700 pub fn crypto_auth_hmacsha512_verify( 701 h: *const libc::c_uchar, 702 in_: *const libc::c_uchar, 703 inlen: libc::c_ulonglong, 704 k: *const libc::c_uchar, 705 ) -> libc::c_int; 706 } 707 #[repr(C)] 708 #[derive(Copy, Clone)] 709 pub struct crypto_auth_hmacsha512_state { 710 pub ictx: crypto_hash_sha512_state, 711 pub octx: crypto_hash_sha512_state, 712 } 713 extern "C" { crypto_auth_hmacsha512_statebytes() -> usize714 pub fn crypto_auth_hmacsha512_statebytes() -> usize; 715 } 716 extern "C" { crypto_auth_hmacsha512_init( state: *mut crypto_auth_hmacsha512_state, key: *const libc::c_uchar, keylen: usize, ) -> libc::c_int717 pub fn crypto_auth_hmacsha512_init( 718 state: *mut crypto_auth_hmacsha512_state, 719 key: *const libc::c_uchar, 720 keylen: usize, 721 ) -> libc::c_int; 722 } 723 extern "C" { crypto_auth_hmacsha512_update( state: *mut crypto_auth_hmacsha512_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int724 pub fn crypto_auth_hmacsha512_update( 725 state: *mut crypto_auth_hmacsha512_state, 726 in_: *const libc::c_uchar, 727 inlen: libc::c_ulonglong, 728 ) -> libc::c_int; 729 } 730 extern "C" { crypto_auth_hmacsha512_final( state: *mut crypto_auth_hmacsha512_state, out: *mut libc::c_uchar, ) -> libc::c_int731 pub fn crypto_auth_hmacsha512_final( 732 state: *mut crypto_auth_hmacsha512_state, 733 out: *mut libc::c_uchar, 734 ) -> libc::c_int; 735 } 736 extern "C" { crypto_auth_hmacsha512_keygen(k: *mut libc::c_uchar)737 pub fn crypto_auth_hmacsha512_keygen(k: *mut libc::c_uchar); 738 } 739 extern "C" { crypto_auth_hmacsha512256_bytes() -> usize740 pub fn crypto_auth_hmacsha512256_bytes() -> usize; 741 } 742 extern "C" { crypto_auth_hmacsha512256_keybytes() -> usize743 pub fn crypto_auth_hmacsha512256_keybytes() -> usize; 744 } 745 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_int746 pub fn crypto_auth_hmacsha512256( 747 out: *mut libc::c_uchar, 748 in_: *const libc::c_uchar, 749 inlen: libc::c_ulonglong, 750 k: *const libc::c_uchar, 751 ) -> libc::c_int; 752 } 753 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_int754 pub fn crypto_auth_hmacsha512256_verify( 755 h: *const libc::c_uchar, 756 in_: *const libc::c_uchar, 757 inlen: libc::c_ulonglong, 758 k: *const libc::c_uchar, 759 ) -> libc::c_int; 760 } 761 pub type crypto_auth_hmacsha512256_state = crypto_auth_hmacsha512_state; 762 extern "C" { crypto_auth_hmacsha512256_statebytes() -> usize763 pub fn crypto_auth_hmacsha512256_statebytes() -> usize; 764 } 765 extern "C" { crypto_auth_hmacsha512256_init( state: *mut crypto_auth_hmacsha512256_state, key: *const libc::c_uchar, keylen: usize, ) -> libc::c_int766 pub fn crypto_auth_hmacsha512256_init( 767 state: *mut crypto_auth_hmacsha512256_state, 768 key: *const libc::c_uchar, 769 keylen: usize, 770 ) -> libc::c_int; 771 } 772 extern "C" { crypto_auth_hmacsha512256_update( state: *mut crypto_auth_hmacsha512256_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int773 pub fn crypto_auth_hmacsha512256_update( 774 state: *mut crypto_auth_hmacsha512256_state, 775 in_: *const libc::c_uchar, 776 inlen: libc::c_ulonglong, 777 ) -> libc::c_int; 778 } 779 extern "C" { crypto_auth_hmacsha512256_final( state: *mut crypto_auth_hmacsha512256_state, out: *mut libc::c_uchar, ) -> libc::c_int780 pub fn crypto_auth_hmacsha512256_final( 781 state: *mut crypto_auth_hmacsha512256_state, 782 out: *mut libc::c_uchar, 783 ) -> libc::c_int; 784 } 785 extern "C" { crypto_auth_hmacsha512256_keygen(k: *mut libc::c_uchar)786 pub fn crypto_auth_hmacsha512256_keygen(k: *mut libc::c_uchar); 787 } 788 extern "C" { crypto_auth_bytes() -> usize789 pub fn crypto_auth_bytes() -> usize; 790 } 791 extern "C" { crypto_auth_keybytes() -> usize792 pub fn crypto_auth_keybytes() -> usize; 793 } 794 extern "C" { crypto_auth_primitive() -> *const libc::c_char795 pub fn crypto_auth_primitive() -> *const libc::c_char; 796 } 797 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_int798 pub fn crypto_auth( 799 out: *mut libc::c_uchar, 800 in_: *const libc::c_uchar, 801 inlen: libc::c_ulonglong, 802 k: *const libc::c_uchar, 803 ) -> libc::c_int; 804 } 805 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_int806 pub fn crypto_auth_verify( 807 h: *const libc::c_uchar, 808 in_: *const libc::c_uchar, 809 inlen: libc::c_ulonglong, 810 k: *const libc::c_uchar, 811 ) -> libc::c_int; 812 } 813 extern "C" { crypto_auth_keygen(k: *mut libc::c_uchar)814 pub fn crypto_auth_keygen(k: *mut libc::c_uchar); 815 } 816 #[repr(C)] 817 #[derive(Copy, Clone)] 818 pub struct crypto_hash_sha256_state { 819 pub state: [u32; 8usize], 820 pub count: u64, 821 pub buf: [u8; 64usize], 822 } 823 extern "C" { crypto_hash_sha256_statebytes() -> usize824 pub fn crypto_hash_sha256_statebytes() -> usize; 825 } 826 extern "C" { crypto_hash_sha256_bytes() -> usize827 pub fn crypto_hash_sha256_bytes() -> usize; 828 } 829 extern "C" { crypto_hash_sha256( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int830 pub fn crypto_hash_sha256( 831 out: *mut libc::c_uchar, 832 in_: *const libc::c_uchar, 833 inlen: libc::c_ulonglong, 834 ) -> libc::c_int; 835 } 836 extern "C" { crypto_hash_sha256_init(state: *mut crypto_hash_sha256_state) -> libc::c_int837 pub fn crypto_hash_sha256_init(state: *mut crypto_hash_sha256_state) -> libc::c_int; 838 } 839 extern "C" { crypto_hash_sha256_update( state: *mut crypto_hash_sha256_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int840 pub fn crypto_hash_sha256_update( 841 state: *mut crypto_hash_sha256_state, 842 in_: *const libc::c_uchar, 843 inlen: libc::c_ulonglong, 844 ) -> libc::c_int; 845 } 846 extern "C" { crypto_hash_sha256_final( state: *mut crypto_hash_sha256_state, out: *mut libc::c_uchar, ) -> libc::c_int847 pub fn crypto_hash_sha256_final( 848 state: *mut crypto_hash_sha256_state, 849 out: *mut libc::c_uchar, 850 ) -> libc::c_int; 851 } 852 extern "C" { crypto_auth_hmacsha256_bytes() -> usize853 pub fn crypto_auth_hmacsha256_bytes() -> usize; 854 } 855 extern "C" { crypto_auth_hmacsha256_keybytes() -> usize856 pub fn crypto_auth_hmacsha256_keybytes() -> usize; 857 } 858 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_int859 pub fn crypto_auth_hmacsha256( 860 out: *mut libc::c_uchar, 861 in_: *const libc::c_uchar, 862 inlen: libc::c_ulonglong, 863 k: *const libc::c_uchar, 864 ) -> libc::c_int; 865 } 866 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_int867 pub fn crypto_auth_hmacsha256_verify( 868 h: *const libc::c_uchar, 869 in_: *const libc::c_uchar, 870 inlen: libc::c_ulonglong, 871 k: *const libc::c_uchar, 872 ) -> libc::c_int; 873 } 874 #[repr(C)] 875 #[derive(Copy, Clone)] 876 pub struct crypto_auth_hmacsha256_state { 877 pub ictx: crypto_hash_sha256_state, 878 pub octx: crypto_hash_sha256_state, 879 } 880 extern "C" { crypto_auth_hmacsha256_statebytes() -> usize881 pub fn crypto_auth_hmacsha256_statebytes() -> usize; 882 } 883 extern "C" { crypto_auth_hmacsha256_init( state: *mut crypto_auth_hmacsha256_state, key: *const libc::c_uchar, keylen: usize, ) -> libc::c_int884 pub fn crypto_auth_hmacsha256_init( 885 state: *mut crypto_auth_hmacsha256_state, 886 key: *const libc::c_uchar, 887 keylen: usize, 888 ) -> libc::c_int; 889 } 890 extern "C" { crypto_auth_hmacsha256_update( state: *mut crypto_auth_hmacsha256_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int891 pub fn crypto_auth_hmacsha256_update( 892 state: *mut crypto_auth_hmacsha256_state, 893 in_: *const libc::c_uchar, 894 inlen: libc::c_ulonglong, 895 ) -> libc::c_int; 896 } 897 extern "C" { crypto_auth_hmacsha256_final( state: *mut crypto_auth_hmacsha256_state, out: *mut libc::c_uchar, ) -> libc::c_int898 pub fn crypto_auth_hmacsha256_final( 899 state: *mut crypto_auth_hmacsha256_state, 900 out: *mut libc::c_uchar, 901 ) -> libc::c_int; 902 } 903 extern "C" { crypto_auth_hmacsha256_keygen(k: *mut libc::c_uchar)904 pub fn crypto_auth_hmacsha256_keygen(k: *mut libc::c_uchar); 905 } 906 extern "C" { crypto_stream_xsalsa20_keybytes() -> usize907 pub fn crypto_stream_xsalsa20_keybytes() -> usize; 908 } 909 extern "C" { crypto_stream_xsalsa20_noncebytes() -> usize910 pub fn crypto_stream_xsalsa20_noncebytes() -> usize; 911 } 912 extern "C" { crypto_stream_xsalsa20_messagebytes_max() -> usize913 pub fn crypto_stream_xsalsa20_messagebytes_max() -> usize; 914 } 915 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_int916 pub fn crypto_stream_xsalsa20( 917 c: *mut libc::c_uchar, 918 clen: libc::c_ulonglong, 919 n: *const libc::c_uchar, 920 k: *const libc::c_uchar, 921 ) -> libc::c_int; 922 } 923 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_int924 pub fn crypto_stream_xsalsa20_xor( 925 c: *mut libc::c_uchar, 926 m: *const libc::c_uchar, 927 mlen: libc::c_ulonglong, 928 n: *const libc::c_uchar, 929 k: *const libc::c_uchar, 930 ) -> libc::c_int; 931 } 932 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_int933 pub fn crypto_stream_xsalsa20_xor_ic( 934 c: *mut libc::c_uchar, 935 m: *const libc::c_uchar, 936 mlen: libc::c_ulonglong, 937 n: *const libc::c_uchar, 938 ic: u64, 939 k: *const libc::c_uchar, 940 ) -> libc::c_int; 941 } 942 extern "C" { crypto_stream_xsalsa20_keygen(k: *mut libc::c_uchar)943 pub fn crypto_stream_xsalsa20_keygen(k: *mut libc::c_uchar); 944 } 945 extern "C" { crypto_box_curve25519xsalsa20poly1305_seedbytes() -> usize946 pub fn crypto_box_curve25519xsalsa20poly1305_seedbytes() -> usize; 947 } 948 extern "C" { crypto_box_curve25519xsalsa20poly1305_publickeybytes() -> usize949 pub fn crypto_box_curve25519xsalsa20poly1305_publickeybytes() -> usize; 950 } 951 extern "C" { crypto_box_curve25519xsalsa20poly1305_secretkeybytes() -> usize952 pub fn crypto_box_curve25519xsalsa20poly1305_secretkeybytes() -> usize; 953 } 954 extern "C" { crypto_box_curve25519xsalsa20poly1305_beforenmbytes() -> usize955 pub fn crypto_box_curve25519xsalsa20poly1305_beforenmbytes() -> usize; 956 } 957 extern "C" { crypto_box_curve25519xsalsa20poly1305_noncebytes() -> usize958 pub fn crypto_box_curve25519xsalsa20poly1305_noncebytes() -> usize; 959 } 960 extern "C" { crypto_box_curve25519xsalsa20poly1305_macbytes() -> usize961 pub fn crypto_box_curve25519xsalsa20poly1305_macbytes() -> usize; 962 } 963 extern "C" { crypto_box_curve25519xsalsa20poly1305_messagebytes_max() -> usize964 pub fn crypto_box_curve25519xsalsa20poly1305_messagebytes_max() -> usize; 965 } 966 extern "C" { crypto_box_curve25519xsalsa20poly1305_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int967 pub fn crypto_box_curve25519xsalsa20poly1305_seed_keypair( 968 pk: *mut libc::c_uchar, 969 sk: *mut libc::c_uchar, 970 seed: *const libc::c_uchar, 971 ) -> libc::c_int; 972 } 973 extern "C" { crypto_box_curve25519xsalsa20poly1305_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, ) -> libc::c_int974 pub fn crypto_box_curve25519xsalsa20poly1305_keypair( 975 pk: *mut libc::c_uchar, 976 sk: *mut libc::c_uchar, 977 ) -> libc::c_int; 978 } 979 extern "C" { crypto_box_curve25519xsalsa20poly1305_beforenm( k: *mut libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int980 pub fn crypto_box_curve25519xsalsa20poly1305_beforenm( 981 k: *mut libc::c_uchar, 982 pk: *const libc::c_uchar, 983 sk: *const libc::c_uchar, 984 ) -> libc::c_int; 985 } 986 extern "C" { crypto_box_curve25519xsalsa20poly1305_boxzerobytes() -> usize987 pub fn crypto_box_curve25519xsalsa20poly1305_boxzerobytes() -> usize; 988 } 989 extern "C" { crypto_box_curve25519xsalsa20poly1305_zerobytes() -> usize990 pub fn crypto_box_curve25519xsalsa20poly1305_zerobytes() -> usize; 991 } 992 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_int993 pub fn crypto_box_curve25519xsalsa20poly1305( 994 c: *mut libc::c_uchar, 995 m: *const libc::c_uchar, 996 mlen: libc::c_ulonglong, 997 n: *const libc::c_uchar, 998 pk: *const libc::c_uchar, 999 sk: *const libc::c_uchar, 1000 ) -> libc::c_int; 1001 } 1002 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_int1003 pub fn crypto_box_curve25519xsalsa20poly1305_open( 1004 m: *mut libc::c_uchar, 1005 c: *const libc::c_uchar, 1006 clen: libc::c_ulonglong, 1007 n: *const libc::c_uchar, 1008 pk: *const libc::c_uchar, 1009 sk: *const libc::c_uchar, 1010 ) -> libc::c_int; 1011 } 1012 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_int1013 pub fn crypto_box_curve25519xsalsa20poly1305_afternm( 1014 c: *mut libc::c_uchar, 1015 m: *const libc::c_uchar, 1016 mlen: libc::c_ulonglong, 1017 n: *const libc::c_uchar, 1018 k: *const libc::c_uchar, 1019 ) -> libc::c_int; 1020 } 1021 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_int1022 pub fn crypto_box_curve25519xsalsa20poly1305_open_afternm( 1023 m: *mut libc::c_uchar, 1024 c: *const libc::c_uchar, 1025 clen: libc::c_ulonglong, 1026 n: *const libc::c_uchar, 1027 k: *const libc::c_uchar, 1028 ) -> libc::c_int; 1029 } 1030 extern "C" { crypto_box_seedbytes() -> usize1031 pub fn crypto_box_seedbytes() -> usize; 1032 } 1033 extern "C" { crypto_box_publickeybytes() -> usize1034 pub fn crypto_box_publickeybytes() -> usize; 1035 } 1036 extern "C" { crypto_box_secretkeybytes() -> usize1037 pub fn crypto_box_secretkeybytes() -> usize; 1038 } 1039 extern "C" { crypto_box_noncebytes() -> usize1040 pub fn crypto_box_noncebytes() -> usize; 1041 } 1042 extern "C" { crypto_box_macbytes() -> usize1043 pub fn crypto_box_macbytes() -> usize; 1044 } 1045 extern "C" { crypto_box_messagebytes_max() -> usize1046 pub fn crypto_box_messagebytes_max() -> usize; 1047 } 1048 extern "C" { crypto_box_primitive() -> *const libc::c_char1049 pub fn crypto_box_primitive() -> *const libc::c_char; 1050 } 1051 extern "C" { crypto_box_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int1052 pub fn crypto_box_seed_keypair( 1053 pk: *mut libc::c_uchar, 1054 sk: *mut libc::c_uchar, 1055 seed: *const libc::c_uchar, 1056 ) -> libc::c_int; 1057 } 1058 extern "C" { crypto_box_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int1059 pub fn crypto_box_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int; 1060 } 1061 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_int1062 pub fn crypto_box_easy( 1063 c: *mut libc::c_uchar, 1064 m: *const libc::c_uchar, 1065 mlen: libc::c_ulonglong, 1066 n: *const libc::c_uchar, 1067 pk: *const libc::c_uchar, 1068 sk: *const libc::c_uchar, 1069 ) -> libc::c_int; 1070 } 1071 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_int1072 pub fn crypto_box_open_easy( 1073 m: *mut libc::c_uchar, 1074 c: *const libc::c_uchar, 1075 clen: libc::c_ulonglong, 1076 n: *const libc::c_uchar, 1077 pk: *const libc::c_uchar, 1078 sk: *const libc::c_uchar, 1079 ) -> libc::c_int; 1080 } 1081 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_int1082 pub fn crypto_box_detached( 1083 c: *mut libc::c_uchar, 1084 mac: *mut libc::c_uchar, 1085 m: *const libc::c_uchar, 1086 mlen: libc::c_ulonglong, 1087 n: *const libc::c_uchar, 1088 pk: *const libc::c_uchar, 1089 sk: *const libc::c_uchar, 1090 ) -> libc::c_int; 1091 } 1092 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_int1093 pub fn crypto_box_open_detached( 1094 m: *mut libc::c_uchar, 1095 c: *const libc::c_uchar, 1096 mac: *const libc::c_uchar, 1097 clen: libc::c_ulonglong, 1098 n: *const libc::c_uchar, 1099 pk: *const libc::c_uchar, 1100 sk: *const libc::c_uchar, 1101 ) -> libc::c_int; 1102 } 1103 extern "C" { crypto_box_beforenmbytes() -> usize1104 pub fn crypto_box_beforenmbytes() -> usize; 1105 } 1106 extern "C" { crypto_box_beforenm( k: *mut libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int1107 pub fn crypto_box_beforenm( 1108 k: *mut libc::c_uchar, 1109 pk: *const libc::c_uchar, 1110 sk: *const libc::c_uchar, 1111 ) -> libc::c_int; 1112 } 1113 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_int1114 pub fn crypto_box_easy_afternm( 1115 c: *mut libc::c_uchar, 1116 m: *const libc::c_uchar, 1117 mlen: libc::c_ulonglong, 1118 n: *const libc::c_uchar, 1119 k: *const libc::c_uchar, 1120 ) -> libc::c_int; 1121 } 1122 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_int1123 pub fn crypto_box_open_easy_afternm( 1124 m: *mut libc::c_uchar, 1125 c: *const libc::c_uchar, 1126 clen: libc::c_ulonglong, 1127 n: *const libc::c_uchar, 1128 k: *const libc::c_uchar, 1129 ) -> libc::c_int; 1130 } 1131 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_int1132 pub fn crypto_box_detached_afternm( 1133 c: *mut libc::c_uchar, 1134 mac: *mut libc::c_uchar, 1135 m: *const libc::c_uchar, 1136 mlen: libc::c_ulonglong, 1137 n: *const libc::c_uchar, 1138 k: *const libc::c_uchar, 1139 ) -> libc::c_int; 1140 } 1141 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_int1142 pub fn crypto_box_open_detached_afternm( 1143 m: *mut libc::c_uchar, 1144 c: *const libc::c_uchar, 1145 mac: *const libc::c_uchar, 1146 clen: libc::c_ulonglong, 1147 n: *const libc::c_uchar, 1148 k: *const libc::c_uchar, 1149 ) -> libc::c_int; 1150 } 1151 extern "C" { crypto_box_sealbytes() -> usize1152 pub fn crypto_box_sealbytes() -> usize; 1153 } 1154 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_int1155 pub fn crypto_box_seal( 1156 c: *mut libc::c_uchar, 1157 m: *const libc::c_uchar, 1158 mlen: libc::c_ulonglong, 1159 pk: *const libc::c_uchar, 1160 ) -> libc::c_int; 1161 } 1162 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_int1163 pub fn crypto_box_seal_open( 1164 m: *mut libc::c_uchar, 1165 c: *const libc::c_uchar, 1166 clen: libc::c_ulonglong, 1167 pk: *const libc::c_uchar, 1168 sk: *const libc::c_uchar, 1169 ) -> libc::c_int; 1170 } 1171 extern "C" { crypto_box_zerobytes() -> usize1172 pub fn crypto_box_zerobytes() -> usize; 1173 } 1174 extern "C" { crypto_box_boxzerobytes() -> usize1175 pub fn crypto_box_boxzerobytes() -> usize; 1176 } 1177 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_int1178 pub fn crypto_box( 1179 c: *mut libc::c_uchar, 1180 m: *const libc::c_uchar, 1181 mlen: libc::c_ulonglong, 1182 n: *const libc::c_uchar, 1183 pk: *const libc::c_uchar, 1184 sk: *const libc::c_uchar, 1185 ) -> libc::c_int; 1186 } 1187 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_int1188 pub fn crypto_box_open( 1189 m: *mut libc::c_uchar, 1190 c: *const libc::c_uchar, 1191 clen: libc::c_ulonglong, 1192 n: *const libc::c_uchar, 1193 pk: *const libc::c_uchar, 1194 sk: *const libc::c_uchar, 1195 ) -> libc::c_int; 1196 } 1197 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_int1198 pub fn crypto_box_afternm( 1199 c: *mut libc::c_uchar, 1200 m: *const libc::c_uchar, 1201 mlen: libc::c_ulonglong, 1202 n: *const libc::c_uchar, 1203 k: *const libc::c_uchar, 1204 ) -> libc::c_int; 1205 } 1206 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_int1207 pub fn crypto_box_open_afternm( 1208 m: *mut libc::c_uchar, 1209 c: *const libc::c_uchar, 1210 clen: libc::c_ulonglong, 1211 n: *const libc::c_uchar, 1212 k: *const libc::c_uchar, 1213 ) -> libc::c_int; 1214 } 1215 extern "C" { crypto_core_hsalsa20_outputbytes() -> usize1216 pub fn crypto_core_hsalsa20_outputbytes() -> usize; 1217 } 1218 extern "C" { crypto_core_hsalsa20_inputbytes() -> usize1219 pub fn crypto_core_hsalsa20_inputbytes() -> usize; 1220 } 1221 extern "C" { crypto_core_hsalsa20_keybytes() -> usize1222 pub fn crypto_core_hsalsa20_keybytes() -> usize; 1223 } 1224 extern "C" { crypto_core_hsalsa20_constbytes() -> usize1225 pub fn crypto_core_hsalsa20_constbytes() -> usize; 1226 } 1227 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_int1228 pub fn crypto_core_hsalsa20( 1229 out: *mut libc::c_uchar, 1230 in_: *const libc::c_uchar, 1231 k: *const libc::c_uchar, 1232 c: *const libc::c_uchar, 1233 ) -> libc::c_int; 1234 } 1235 extern "C" { crypto_core_hchacha20_outputbytes() -> usize1236 pub fn crypto_core_hchacha20_outputbytes() -> usize; 1237 } 1238 extern "C" { crypto_core_hchacha20_inputbytes() -> usize1239 pub fn crypto_core_hchacha20_inputbytes() -> usize; 1240 } 1241 extern "C" { crypto_core_hchacha20_keybytes() -> usize1242 pub fn crypto_core_hchacha20_keybytes() -> usize; 1243 } 1244 extern "C" { crypto_core_hchacha20_constbytes() -> usize1245 pub fn crypto_core_hchacha20_constbytes() -> usize; 1246 } 1247 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_int1248 pub fn crypto_core_hchacha20( 1249 out: *mut libc::c_uchar, 1250 in_: *const libc::c_uchar, 1251 k: *const libc::c_uchar, 1252 c: *const libc::c_uchar, 1253 ) -> libc::c_int; 1254 } 1255 extern "C" { crypto_core_salsa20_outputbytes() -> usize1256 pub fn crypto_core_salsa20_outputbytes() -> usize; 1257 } 1258 extern "C" { crypto_core_salsa20_inputbytes() -> usize1259 pub fn crypto_core_salsa20_inputbytes() -> usize; 1260 } 1261 extern "C" { crypto_core_salsa20_keybytes() -> usize1262 pub fn crypto_core_salsa20_keybytes() -> usize; 1263 } 1264 extern "C" { crypto_core_salsa20_constbytes() -> usize1265 pub fn crypto_core_salsa20_constbytes() -> usize; 1266 } 1267 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_int1268 pub fn crypto_core_salsa20( 1269 out: *mut libc::c_uchar, 1270 in_: *const libc::c_uchar, 1271 k: *const libc::c_uchar, 1272 c: *const libc::c_uchar, 1273 ) -> libc::c_int; 1274 } 1275 extern "C" { crypto_core_salsa2012_outputbytes() -> usize1276 pub fn crypto_core_salsa2012_outputbytes() -> usize; 1277 } 1278 extern "C" { crypto_core_salsa2012_inputbytes() -> usize1279 pub fn crypto_core_salsa2012_inputbytes() -> usize; 1280 } 1281 extern "C" { crypto_core_salsa2012_keybytes() -> usize1282 pub fn crypto_core_salsa2012_keybytes() -> usize; 1283 } 1284 extern "C" { crypto_core_salsa2012_constbytes() -> usize1285 pub fn crypto_core_salsa2012_constbytes() -> usize; 1286 } 1287 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_int1288 pub fn crypto_core_salsa2012( 1289 out: *mut libc::c_uchar, 1290 in_: *const libc::c_uchar, 1291 k: *const libc::c_uchar, 1292 c: *const libc::c_uchar, 1293 ) -> libc::c_int; 1294 } 1295 extern "C" { crypto_core_salsa208_outputbytes() -> usize1296 pub fn crypto_core_salsa208_outputbytes() -> usize; 1297 } 1298 extern "C" { crypto_core_salsa208_inputbytes() -> usize1299 pub fn crypto_core_salsa208_inputbytes() -> usize; 1300 } 1301 extern "C" { crypto_core_salsa208_keybytes() -> usize1302 pub fn crypto_core_salsa208_keybytes() -> usize; 1303 } 1304 extern "C" { crypto_core_salsa208_constbytes() -> usize1305 pub fn crypto_core_salsa208_constbytes() -> usize; 1306 } 1307 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_int1308 pub fn crypto_core_salsa208( 1309 out: *mut libc::c_uchar, 1310 in_: *const libc::c_uchar, 1311 k: *const libc::c_uchar, 1312 c: *const libc::c_uchar, 1313 ) -> libc::c_int; 1314 } 1315 #[repr(C)] 1316 #[repr(align(64))] 1317 #[derive(Copy, Clone)] 1318 pub struct crypto_generichash_blake2b_state { 1319 pub opaque: [libc::c_uchar; 384usize], 1320 } 1321 extern "C" { crypto_generichash_blake2b_bytes_min() -> usize1322 pub fn crypto_generichash_blake2b_bytes_min() -> usize; 1323 } 1324 extern "C" { crypto_generichash_blake2b_bytes_max() -> usize1325 pub fn crypto_generichash_blake2b_bytes_max() -> usize; 1326 } 1327 extern "C" { crypto_generichash_blake2b_bytes() -> usize1328 pub fn crypto_generichash_blake2b_bytes() -> usize; 1329 } 1330 extern "C" { crypto_generichash_blake2b_keybytes_min() -> usize1331 pub fn crypto_generichash_blake2b_keybytes_min() -> usize; 1332 } 1333 extern "C" { crypto_generichash_blake2b_keybytes_max() -> usize1334 pub fn crypto_generichash_blake2b_keybytes_max() -> usize; 1335 } 1336 extern "C" { crypto_generichash_blake2b_keybytes() -> usize1337 pub fn crypto_generichash_blake2b_keybytes() -> usize; 1338 } 1339 extern "C" { crypto_generichash_blake2b_saltbytes() -> usize1340 pub fn crypto_generichash_blake2b_saltbytes() -> usize; 1341 } 1342 extern "C" { crypto_generichash_blake2b_personalbytes() -> usize1343 pub fn crypto_generichash_blake2b_personalbytes() -> usize; 1344 } 1345 extern "C" { crypto_generichash_blake2b_statebytes() -> usize1346 pub fn crypto_generichash_blake2b_statebytes() -> usize; 1347 } 1348 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_int1349 pub fn crypto_generichash_blake2b( 1350 out: *mut libc::c_uchar, 1351 outlen: usize, 1352 in_: *const libc::c_uchar, 1353 inlen: libc::c_ulonglong, 1354 key: *const libc::c_uchar, 1355 keylen: usize, 1356 ) -> libc::c_int; 1357 } 1358 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_int1359 pub fn crypto_generichash_blake2b_salt_personal( 1360 out: *mut libc::c_uchar, 1361 outlen: usize, 1362 in_: *const libc::c_uchar, 1363 inlen: libc::c_ulonglong, 1364 key: *const libc::c_uchar, 1365 keylen: usize, 1366 salt: *const libc::c_uchar, 1367 personal: *const libc::c_uchar, 1368 ) -> libc::c_int; 1369 } 1370 extern "C" { crypto_generichash_blake2b_init( state: *mut crypto_generichash_blake2b_state, key: *const libc::c_uchar, keylen: usize, outlen: usize, ) -> libc::c_int1371 pub fn crypto_generichash_blake2b_init( 1372 state: *mut crypto_generichash_blake2b_state, 1373 key: *const libc::c_uchar, 1374 keylen: usize, 1375 outlen: usize, 1376 ) -> libc::c_int; 1377 } 1378 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_int1379 pub fn crypto_generichash_blake2b_init_salt_personal( 1380 state: *mut crypto_generichash_blake2b_state, 1381 key: *const libc::c_uchar, 1382 keylen: usize, 1383 outlen: usize, 1384 salt: *const libc::c_uchar, 1385 personal: *const libc::c_uchar, 1386 ) -> libc::c_int; 1387 } 1388 extern "C" { crypto_generichash_blake2b_update( state: *mut crypto_generichash_blake2b_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1389 pub fn crypto_generichash_blake2b_update( 1390 state: *mut crypto_generichash_blake2b_state, 1391 in_: *const libc::c_uchar, 1392 inlen: libc::c_ulonglong, 1393 ) -> libc::c_int; 1394 } 1395 extern "C" { crypto_generichash_blake2b_final( state: *mut crypto_generichash_blake2b_state, out: *mut libc::c_uchar, outlen: usize, ) -> libc::c_int1396 pub fn crypto_generichash_blake2b_final( 1397 state: *mut crypto_generichash_blake2b_state, 1398 out: *mut libc::c_uchar, 1399 outlen: usize, 1400 ) -> libc::c_int; 1401 } 1402 extern "C" { crypto_generichash_blake2b_keygen(k: *mut libc::c_uchar)1403 pub fn crypto_generichash_blake2b_keygen(k: *mut libc::c_uchar); 1404 } 1405 extern "C" { crypto_generichash_bytes_min() -> usize1406 pub fn crypto_generichash_bytes_min() -> usize; 1407 } 1408 extern "C" { crypto_generichash_bytes_max() -> usize1409 pub fn crypto_generichash_bytes_max() -> usize; 1410 } 1411 extern "C" { crypto_generichash_bytes() -> usize1412 pub fn crypto_generichash_bytes() -> usize; 1413 } 1414 extern "C" { crypto_generichash_keybytes_min() -> usize1415 pub fn crypto_generichash_keybytes_min() -> usize; 1416 } 1417 extern "C" { crypto_generichash_keybytes_max() -> usize1418 pub fn crypto_generichash_keybytes_max() -> usize; 1419 } 1420 extern "C" { crypto_generichash_keybytes() -> usize1421 pub fn crypto_generichash_keybytes() -> usize; 1422 } 1423 extern "C" { crypto_generichash_primitive() -> *const libc::c_char1424 pub fn crypto_generichash_primitive() -> *const libc::c_char; 1425 } 1426 pub type crypto_generichash_state = crypto_generichash_blake2b_state; 1427 extern "C" { crypto_generichash_statebytes() -> usize1428 pub fn crypto_generichash_statebytes() -> usize; 1429 } 1430 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_int1431 pub fn crypto_generichash( 1432 out: *mut libc::c_uchar, 1433 outlen: usize, 1434 in_: *const libc::c_uchar, 1435 inlen: libc::c_ulonglong, 1436 key: *const libc::c_uchar, 1437 keylen: usize, 1438 ) -> libc::c_int; 1439 } 1440 extern "C" { crypto_generichash_init( state: *mut crypto_generichash_state, key: *const libc::c_uchar, keylen: usize, outlen: usize, ) -> libc::c_int1441 pub fn crypto_generichash_init( 1442 state: *mut crypto_generichash_state, 1443 key: *const libc::c_uchar, 1444 keylen: usize, 1445 outlen: usize, 1446 ) -> libc::c_int; 1447 } 1448 extern "C" { crypto_generichash_update( state: *mut crypto_generichash_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1449 pub fn crypto_generichash_update( 1450 state: *mut crypto_generichash_state, 1451 in_: *const libc::c_uchar, 1452 inlen: libc::c_ulonglong, 1453 ) -> libc::c_int; 1454 } 1455 extern "C" { crypto_generichash_final( state: *mut crypto_generichash_state, out: *mut libc::c_uchar, outlen: usize, ) -> libc::c_int1456 pub fn crypto_generichash_final( 1457 state: *mut crypto_generichash_state, 1458 out: *mut libc::c_uchar, 1459 outlen: usize, 1460 ) -> libc::c_int; 1461 } 1462 extern "C" { crypto_generichash_keygen(k: *mut libc::c_uchar)1463 pub fn crypto_generichash_keygen(k: *mut libc::c_uchar); 1464 } 1465 extern "C" { crypto_hash_bytes() -> usize1466 pub fn crypto_hash_bytes() -> usize; 1467 } 1468 extern "C" { crypto_hash( out: *mut libc::c_uchar, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1469 pub fn crypto_hash( 1470 out: *mut libc::c_uchar, 1471 in_: *const libc::c_uchar, 1472 inlen: libc::c_ulonglong, 1473 ) -> libc::c_int; 1474 } 1475 extern "C" { crypto_hash_primitive() -> *const libc::c_char1476 pub fn crypto_hash_primitive() -> *const libc::c_char; 1477 } 1478 extern "C" { crypto_kdf_blake2b_bytes_min() -> usize1479 pub fn crypto_kdf_blake2b_bytes_min() -> usize; 1480 } 1481 extern "C" { crypto_kdf_blake2b_bytes_max() -> usize1482 pub fn crypto_kdf_blake2b_bytes_max() -> usize; 1483 } 1484 extern "C" { crypto_kdf_blake2b_contextbytes() -> usize1485 pub fn crypto_kdf_blake2b_contextbytes() -> usize; 1486 } 1487 extern "C" { crypto_kdf_blake2b_keybytes() -> usize1488 pub fn crypto_kdf_blake2b_keybytes() -> usize; 1489 } 1490 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_int1491 pub fn crypto_kdf_blake2b_derive_from_key( 1492 subkey: *mut libc::c_uchar, 1493 subkey_len: usize, 1494 subkey_id: u64, 1495 ctx: *const libc::c_char, 1496 key: *const libc::c_uchar, 1497 ) -> libc::c_int; 1498 } 1499 extern "C" { crypto_kdf_bytes_min() -> usize1500 pub fn crypto_kdf_bytes_min() -> usize; 1501 } 1502 extern "C" { crypto_kdf_bytes_max() -> usize1503 pub fn crypto_kdf_bytes_max() -> usize; 1504 } 1505 extern "C" { crypto_kdf_contextbytes() -> usize1506 pub fn crypto_kdf_contextbytes() -> usize; 1507 } 1508 extern "C" { crypto_kdf_keybytes() -> usize1509 pub fn crypto_kdf_keybytes() -> usize; 1510 } 1511 extern "C" { crypto_kdf_primitive() -> *const libc::c_char1512 pub fn crypto_kdf_primitive() -> *const libc::c_char; 1513 } 1514 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_int1515 pub fn crypto_kdf_derive_from_key( 1516 subkey: *mut libc::c_uchar, 1517 subkey_len: usize, 1518 subkey_id: u64, 1519 ctx: *const libc::c_char, 1520 key: *const libc::c_uchar, 1521 ) -> libc::c_int; 1522 } 1523 extern "C" { crypto_kdf_keygen(k: *mut libc::c_uchar)1524 pub fn crypto_kdf_keygen(k: *mut libc::c_uchar); 1525 } 1526 extern "C" { crypto_kx_publickeybytes() -> usize1527 pub fn crypto_kx_publickeybytes() -> usize; 1528 } 1529 extern "C" { crypto_kx_secretkeybytes() -> usize1530 pub fn crypto_kx_secretkeybytes() -> usize; 1531 } 1532 extern "C" { crypto_kx_seedbytes() -> usize1533 pub fn crypto_kx_seedbytes() -> usize; 1534 } 1535 extern "C" { crypto_kx_sessionkeybytes() -> usize1536 pub fn crypto_kx_sessionkeybytes() -> usize; 1537 } 1538 extern "C" { crypto_kx_primitive() -> *const libc::c_char1539 pub fn crypto_kx_primitive() -> *const libc::c_char; 1540 } 1541 extern "C" { crypto_kx_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int1542 pub fn crypto_kx_seed_keypair( 1543 pk: *mut libc::c_uchar, 1544 sk: *mut libc::c_uchar, 1545 seed: *const libc::c_uchar, 1546 ) -> libc::c_int; 1547 } 1548 extern "C" { crypto_kx_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int1549 pub fn crypto_kx_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int; 1550 } 1551 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_int1552 pub fn crypto_kx_client_session_keys( 1553 rx: *mut libc::c_uchar, 1554 tx: *mut libc::c_uchar, 1555 client_pk: *const libc::c_uchar, 1556 client_sk: *const libc::c_uchar, 1557 server_pk: *const libc::c_uchar, 1558 ) -> libc::c_int; 1559 } 1560 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_int1561 pub fn crypto_kx_server_session_keys( 1562 rx: *mut libc::c_uchar, 1563 tx: *mut libc::c_uchar, 1564 server_pk: *const libc::c_uchar, 1565 server_sk: *const libc::c_uchar, 1566 client_pk: *const libc::c_uchar, 1567 ) -> libc::c_int; 1568 } 1569 #[repr(C)] 1570 #[repr(align(16))] 1571 #[derive(Copy, Clone)] 1572 pub struct crypto_onetimeauth_poly1305_state { 1573 pub opaque: [libc::c_uchar; 256usize], 1574 } 1575 extern "C" { crypto_onetimeauth_poly1305_statebytes() -> usize1576 pub fn crypto_onetimeauth_poly1305_statebytes() -> usize; 1577 } 1578 extern "C" { crypto_onetimeauth_poly1305_bytes() -> usize1579 pub fn crypto_onetimeauth_poly1305_bytes() -> usize; 1580 } 1581 extern "C" { crypto_onetimeauth_poly1305_keybytes() -> usize1582 pub fn crypto_onetimeauth_poly1305_keybytes() -> usize; 1583 } 1584 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_int1585 pub fn crypto_onetimeauth_poly1305( 1586 out: *mut libc::c_uchar, 1587 in_: *const libc::c_uchar, 1588 inlen: libc::c_ulonglong, 1589 k: *const libc::c_uchar, 1590 ) -> libc::c_int; 1591 } 1592 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_int1593 pub fn crypto_onetimeauth_poly1305_verify( 1594 h: *const libc::c_uchar, 1595 in_: *const libc::c_uchar, 1596 inlen: libc::c_ulonglong, 1597 k: *const libc::c_uchar, 1598 ) -> libc::c_int; 1599 } 1600 extern "C" { crypto_onetimeauth_poly1305_init( state: *mut crypto_onetimeauth_poly1305_state, key: *const libc::c_uchar, ) -> libc::c_int1601 pub fn crypto_onetimeauth_poly1305_init( 1602 state: *mut crypto_onetimeauth_poly1305_state, 1603 key: *const libc::c_uchar, 1604 ) -> libc::c_int; 1605 } 1606 extern "C" { crypto_onetimeauth_poly1305_update( state: *mut crypto_onetimeauth_poly1305_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1607 pub fn crypto_onetimeauth_poly1305_update( 1608 state: *mut crypto_onetimeauth_poly1305_state, 1609 in_: *const libc::c_uchar, 1610 inlen: libc::c_ulonglong, 1611 ) -> libc::c_int; 1612 } 1613 extern "C" { crypto_onetimeauth_poly1305_final( state: *mut crypto_onetimeauth_poly1305_state, out: *mut libc::c_uchar, ) -> libc::c_int1614 pub fn crypto_onetimeauth_poly1305_final( 1615 state: *mut crypto_onetimeauth_poly1305_state, 1616 out: *mut libc::c_uchar, 1617 ) -> libc::c_int; 1618 } 1619 extern "C" { crypto_onetimeauth_poly1305_keygen(k: *mut libc::c_uchar)1620 pub fn crypto_onetimeauth_poly1305_keygen(k: *mut libc::c_uchar); 1621 } 1622 pub type crypto_onetimeauth_state = crypto_onetimeauth_poly1305_state; 1623 extern "C" { crypto_onetimeauth_statebytes() -> usize1624 pub fn crypto_onetimeauth_statebytes() -> usize; 1625 } 1626 extern "C" { crypto_onetimeauth_bytes() -> usize1627 pub fn crypto_onetimeauth_bytes() -> usize; 1628 } 1629 extern "C" { crypto_onetimeauth_keybytes() -> usize1630 pub fn crypto_onetimeauth_keybytes() -> usize; 1631 } 1632 extern "C" { crypto_onetimeauth_primitive() -> *const libc::c_char1633 pub fn crypto_onetimeauth_primitive() -> *const libc::c_char; 1634 } 1635 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_int1636 pub fn crypto_onetimeauth( 1637 out: *mut libc::c_uchar, 1638 in_: *const libc::c_uchar, 1639 inlen: libc::c_ulonglong, 1640 k: *const libc::c_uchar, 1641 ) -> libc::c_int; 1642 } 1643 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_int1644 pub fn crypto_onetimeauth_verify( 1645 h: *const libc::c_uchar, 1646 in_: *const libc::c_uchar, 1647 inlen: libc::c_ulonglong, 1648 k: *const libc::c_uchar, 1649 ) -> libc::c_int; 1650 } 1651 extern "C" { crypto_onetimeauth_init( state: *mut crypto_onetimeauth_state, key: *const libc::c_uchar, ) -> libc::c_int1652 pub fn crypto_onetimeauth_init( 1653 state: *mut crypto_onetimeauth_state, 1654 key: *const libc::c_uchar, 1655 ) -> libc::c_int; 1656 } 1657 extern "C" { crypto_onetimeauth_update( state: *mut crypto_onetimeauth_state, in_: *const libc::c_uchar, inlen: libc::c_ulonglong, ) -> libc::c_int1658 pub fn crypto_onetimeauth_update( 1659 state: *mut crypto_onetimeauth_state, 1660 in_: *const libc::c_uchar, 1661 inlen: libc::c_ulonglong, 1662 ) -> libc::c_int; 1663 } 1664 extern "C" { crypto_onetimeauth_final( state: *mut crypto_onetimeauth_state, out: *mut libc::c_uchar, ) -> libc::c_int1665 pub fn crypto_onetimeauth_final( 1666 state: *mut crypto_onetimeauth_state, 1667 out: *mut libc::c_uchar, 1668 ) -> libc::c_int; 1669 } 1670 extern "C" { crypto_onetimeauth_keygen(k: *mut libc::c_uchar)1671 pub fn crypto_onetimeauth_keygen(k: *mut libc::c_uchar); 1672 } 1673 extern "C" { crypto_pwhash_argon2i_alg_argon2i13() -> libc::c_int1674 pub fn crypto_pwhash_argon2i_alg_argon2i13() -> libc::c_int; 1675 } 1676 extern "C" { crypto_pwhash_argon2i_bytes_min() -> usize1677 pub fn crypto_pwhash_argon2i_bytes_min() -> usize; 1678 } 1679 extern "C" { crypto_pwhash_argon2i_bytes_max() -> usize1680 pub fn crypto_pwhash_argon2i_bytes_max() -> usize; 1681 } 1682 extern "C" { crypto_pwhash_argon2i_passwd_min() -> usize1683 pub fn crypto_pwhash_argon2i_passwd_min() -> usize; 1684 } 1685 extern "C" { crypto_pwhash_argon2i_passwd_max() -> usize1686 pub fn crypto_pwhash_argon2i_passwd_max() -> usize; 1687 } 1688 extern "C" { crypto_pwhash_argon2i_saltbytes() -> usize1689 pub fn crypto_pwhash_argon2i_saltbytes() -> usize; 1690 } 1691 extern "C" { crypto_pwhash_argon2i_strbytes() -> usize1692 pub fn crypto_pwhash_argon2i_strbytes() -> usize; 1693 } 1694 extern "C" { crypto_pwhash_argon2i_strprefix() -> *const libc::c_char1695 pub fn crypto_pwhash_argon2i_strprefix() -> *const libc::c_char; 1696 } 1697 extern "C" { crypto_pwhash_argon2i_opslimit_min() -> usize1698 pub fn crypto_pwhash_argon2i_opslimit_min() -> usize; 1699 } 1700 extern "C" { crypto_pwhash_argon2i_opslimit_max() -> usize1701 pub fn crypto_pwhash_argon2i_opslimit_max() -> usize; 1702 } 1703 extern "C" { crypto_pwhash_argon2i_memlimit_min() -> usize1704 pub fn crypto_pwhash_argon2i_memlimit_min() -> usize; 1705 } 1706 extern "C" { crypto_pwhash_argon2i_memlimit_max() -> usize1707 pub fn crypto_pwhash_argon2i_memlimit_max() -> usize; 1708 } 1709 extern "C" { crypto_pwhash_argon2i_opslimit_interactive() -> usize1710 pub fn crypto_pwhash_argon2i_opslimit_interactive() -> usize; 1711 } 1712 extern "C" { crypto_pwhash_argon2i_memlimit_interactive() -> usize1713 pub fn crypto_pwhash_argon2i_memlimit_interactive() -> usize; 1714 } 1715 extern "C" { crypto_pwhash_argon2i_opslimit_moderate() -> usize1716 pub fn crypto_pwhash_argon2i_opslimit_moderate() -> usize; 1717 } 1718 extern "C" { crypto_pwhash_argon2i_memlimit_moderate() -> usize1719 pub fn crypto_pwhash_argon2i_memlimit_moderate() -> usize; 1720 } 1721 extern "C" { crypto_pwhash_argon2i_opslimit_sensitive() -> usize1722 pub fn crypto_pwhash_argon2i_opslimit_sensitive() -> usize; 1723 } 1724 extern "C" { crypto_pwhash_argon2i_memlimit_sensitive() -> usize1725 pub fn crypto_pwhash_argon2i_memlimit_sensitive() -> usize; 1726 } 1727 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_int1728 pub fn crypto_pwhash_argon2i( 1729 out: *mut libc::c_uchar, 1730 outlen: libc::c_ulonglong, 1731 passwd: *const libc::c_char, 1732 passwdlen: libc::c_ulonglong, 1733 salt: *const libc::c_uchar, 1734 opslimit: libc::c_ulonglong, 1735 memlimit: usize, 1736 alg: libc::c_int, 1737 ) -> libc::c_int; 1738 } 1739 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_int1740 pub fn crypto_pwhash_argon2i_str( 1741 out: *mut libc::c_char, 1742 passwd: *const libc::c_char, 1743 passwdlen: libc::c_ulonglong, 1744 opslimit: libc::c_ulonglong, 1745 memlimit: usize, 1746 ) -> libc::c_int; 1747 } 1748 extern "C" { crypto_pwhash_argon2i_str_verify( str: *const libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, ) -> libc::c_int1749 pub fn crypto_pwhash_argon2i_str_verify( 1750 str: *const libc::c_char, 1751 passwd: *const libc::c_char, 1752 passwdlen: libc::c_ulonglong, 1753 ) -> libc::c_int; 1754 } 1755 extern "C" { crypto_pwhash_argon2i_str_needs_rehash( str: *const libc::c_char, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int1756 pub fn crypto_pwhash_argon2i_str_needs_rehash( 1757 str: *const libc::c_char, 1758 opslimit: libc::c_ulonglong, 1759 memlimit: usize, 1760 ) -> libc::c_int; 1761 } 1762 extern "C" { crypto_pwhash_argon2id_alg_argon2id13() -> libc::c_int1763 pub fn crypto_pwhash_argon2id_alg_argon2id13() -> libc::c_int; 1764 } 1765 extern "C" { crypto_pwhash_argon2id_bytes_min() -> usize1766 pub fn crypto_pwhash_argon2id_bytes_min() -> usize; 1767 } 1768 extern "C" { crypto_pwhash_argon2id_bytes_max() -> usize1769 pub fn crypto_pwhash_argon2id_bytes_max() -> usize; 1770 } 1771 extern "C" { crypto_pwhash_argon2id_passwd_min() -> usize1772 pub fn crypto_pwhash_argon2id_passwd_min() -> usize; 1773 } 1774 extern "C" { crypto_pwhash_argon2id_passwd_max() -> usize1775 pub fn crypto_pwhash_argon2id_passwd_max() -> usize; 1776 } 1777 extern "C" { crypto_pwhash_argon2id_saltbytes() -> usize1778 pub fn crypto_pwhash_argon2id_saltbytes() -> usize; 1779 } 1780 extern "C" { crypto_pwhash_argon2id_strbytes() -> usize1781 pub fn crypto_pwhash_argon2id_strbytes() -> usize; 1782 } 1783 extern "C" { crypto_pwhash_argon2id_strprefix() -> *const libc::c_char1784 pub fn crypto_pwhash_argon2id_strprefix() -> *const libc::c_char; 1785 } 1786 extern "C" { crypto_pwhash_argon2id_opslimit_min() -> usize1787 pub fn crypto_pwhash_argon2id_opslimit_min() -> usize; 1788 } 1789 extern "C" { crypto_pwhash_argon2id_opslimit_max() -> usize1790 pub fn crypto_pwhash_argon2id_opslimit_max() -> usize; 1791 } 1792 extern "C" { crypto_pwhash_argon2id_memlimit_min() -> usize1793 pub fn crypto_pwhash_argon2id_memlimit_min() -> usize; 1794 } 1795 extern "C" { crypto_pwhash_argon2id_memlimit_max() -> usize1796 pub fn crypto_pwhash_argon2id_memlimit_max() -> usize; 1797 } 1798 extern "C" { crypto_pwhash_argon2id_opslimit_interactive() -> usize1799 pub fn crypto_pwhash_argon2id_opslimit_interactive() -> usize; 1800 } 1801 extern "C" { crypto_pwhash_argon2id_memlimit_interactive() -> usize1802 pub fn crypto_pwhash_argon2id_memlimit_interactive() -> usize; 1803 } 1804 extern "C" { crypto_pwhash_argon2id_opslimit_moderate() -> usize1805 pub fn crypto_pwhash_argon2id_opslimit_moderate() -> usize; 1806 } 1807 extern "C" { crypto_pwhash_argon2id_memlimit_moderate() -> usize1808 pub fn crypto_pwhash_argon2id_memlimit_moderate() -> usize; 1809 } 1810 extern "C" { crypto_pwhash_argon2id_opslimit_sensitive() -> usize1811 pub fn crypto_pwhash_argon2id_opslimit_sensitive() -> usize; 1812 } 1813 extern "C" { crypto_pwhash_argon2id_memlimit_sensitive() -> usize1814 pub fn crypto_pwhash_argon2id_memlimit_sensitive() -> usize; 1815 } 1816 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_int1817 pub fn crypto_pwhash_argon2id( 1818 out: *mut libc::c_uchar, 1819 outlen: libc::c_ulonglong, 1820 passwd: *const libc::c_char, 1821 passwdlen: libc::c_ulonglong, 1822 salt: *const libc::c_uchar, 1823 opslimit: libc::c_ulonglong, 1824 memlimit: usize, 1825 alg: libc::c_int, 1826 ) -> libc::c_int; 1827 } 1828 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_int1829 pub fn crypto_pwhash_argon2id_str( 1830 out: *mut libc::c_char, 1831 passwd: *const libc::c_char, 1832 passwdlen: libc::c_ulonglong, 1833 opslimit: libc::c_ulonglong, 1834 memlimit: usize, 1835 ) -> libc::c_int; 1836 } 1837 extern "C" { crypto_pwhash_argon2id_str_verify( str: *const libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, ) -> libc::c_int1838 pub fn crypto_pwhash_argon2id_str_verify( 1839 str: *const libc::c_char, 1840 passwd: *const libc::c_char, 1841 passwdlen: libc::c_ulonglong, 1842 ) -> libc::c_int; 1843 } 1844 extern "C" { crypto_pwhash_argon2id_str_needs_rehash( str: *const libc::c_char, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int1845 pub fn crypto_pwhash_argon2id_str_needs_rehash( 1846 str: *const libc::c_char, 1847 opslimit: libc::c_ulonglong, 1848 memlimit: usize, 1849 ) -> libc::c_int; 1850 } 1851 extern "C" { crypto_pwhash_alg_argon2i13() -> libc::c_int1852 pub fn crypto_pwhash_alg_argon2i13() -> libc::c_int; 1853 } 1854 extern "C" { crypto_pwhash_alg_argon2id13() -> libc::c_int1855 pub fn crypto_pwhash_alg_argon2id13() -> libc::c_int; 1856 } 1857 extern "C" { crypto_pwhash_alg_default() -> libc::c_int1858 pub fn crypto_pwhash_alg_default() -> libc::c_int; 1859 } 1860 extern "C" { crypto_pwhash_bytes_min() -> usize1861 pub fn crypto_pwhash_bytes_min() -> usize; 1862 } 1863 extern "C" { crypto_pwhash_bytes_max() -> usize1864 pub fn crypto_pwhash_bytes_max() -> usize; 1865 } 1866 extern "C" { crypto_pwhash_passwd_min() -> usize1867 pub fn crypto_pwhash_passwd_min() -> usize; 1868 } 1869 extern "C" { crypto_pwhash_passwd_max() -> usize1870 pub fn crypto_pwhash_passwd_max() -> usize; 1871 } 1872 extern "C" { crypto_pwhash_saltbytes() -> usize1873 pub fn crypto_pwhash_saltbytes() -> usize; 1874 } 1875 extern "C" { crypto_pwhash_strbytes() -> usize1876 pub fn crypto_pwhash_strbytes() -> usize; 1877 } 1878 extern "C" { crypto_pwhash_strprefix() -> *const libc::c_char1879 pub fn crypto_pwhash_strprefix() -> *const libc::c_char; 1880 } 1881 extern "C" { crypto_pwhash_opslimit_min() -> usize1882 pub fn crypto_pwhash_opslimit_min() -> usize; 1883 } 1884 extern "C" { crypto_pwhash_opslimit_max() -> usize1885 pub fn crypto_pwhash_opslimit_max() -> usize; 1886 } 1887 extern "C" { crypto_pwhash_memlimit_min() -> usize1888 pub fn crypto_pwhash_memlimit_min() -> usize; 1889 } 1890 extern "C" { crypto_pwhash_memlimit_max() -> usize1891 pub fn crypto_pwhash_memlimit_max() -> usize; 1892 } 1893 extern "C" { crypto_pwhash_opslimit_interactive() -> usize1894 pub fn crypto_pwhash_opslimit_interactive() -> usize; 1895 } 1896 extern "C" { crypto_pwhash_memlimit_interactive() -> usize1897 pub fn crypto_pwhash_memlimit_interactive() -> usize; 1898 } 1899 extern "C" { crypto_pwhash_opslimit_moderate() -> usize1900 pub fn crypto_pwhash_opslimit_moderate() -> usize; 1901 } 1902 extern "C" { crypto_pwhash_memlimit_moderate() -> usize1903 pub fn crypto_pwhash_memlimit_moderate() -> usize; 1904 } 1905 extern "C" { crypto_pwhash_opslimit_sensitive() -> usize1906 pub fn crypto_pwhash_opslimit_sensitive() -> usize; 1907 } 1908 extern "C" { crypto_pwhash_memlimit_sensitive() -> usize1909 pub fn crypto_pwhash_memlimit_sensitive() -> usize; 1910 } 1911 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_int1912 pub fn crypto_pwhash( 1913 out: *mut libc::c_uchar, 1914 outlen: libc::c_ulonglong, 1915 passwd: *const libc::c_char, 1916 passwdlen: libc::c_ulonglong, 1917 salt: *const libc::c_uchar, 1918 opslimit: libc::c_ulonglong, 1919 memlimit: usize, 1920 alg: libc::c_int, 1921 ) -> libc::c_int; 1922 } 1923 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_int1924 pub fn crypto_pwhash_str( 1925 out: *mut libc::c_char, 1926 passwd: *const libc::c_char, 1927 passwdlen: libc::c_ulonglong, 1928 opslimit: libc::c_ulonglong, 1929 memlimit: usize, 1930 ) -> libc::c_int; 1931 } 1932 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_int1933 pub fn crypto_pwhash_str_alg( 1934 out: *mut libc::c_char, 1935 passwd: *const libc::c_char, 1936 passwdlen: libc::c_ulonglong, 1937 opslimit: libc::c_ulonglong, 1938 memlimit: usize, 1939 alg: libc::c_int, 1940 ) -> libc::c_int; 1941 } 1942 extern "C" { crypto_pwhash_str_verify( str: *const libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, ) -> libc::c_int1943 pub fn crypto_pwhash_str_verify( 1944 str: *const libc::c_char, 1945 passwd: *const libc::c_char, 1946 passwdlen: libc::c_ulonglong, 1947 ) -> libc::c_int; 1948 } 1949 extern "C" { crypto_pwhash_str_needs_rehash( str: *const libc::c_char, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int1950 pub fn crypto_pwhash_str_needs_rehash( 1951 str: *const libc::c_char, 1952 opslimit: libc::c_ulonglong, 1953 memlimit: usize, 1954 ) -> libc::c_int; 1955 } 1956 extern "C" { crypto_pwhash_primitive() -> *const libc::c_char1957 pub fn crypto_pwhash_primitive() -> *const libc::c_char; 1958 } 1959 extern "C" { crypto_scalarmult_curve25519_bytes() -> usize1960 pub fn crypto_scalarmult_curve25519_bytes() -> usize; 1961 } 1962 extern "C" { crypto_scalarmult_curve25519_scalarbytes() -> usize1963 pub fn crypto_scalarmult_curve25519_scalarbytes() -> usize; 1964 } 1965 extern "C" { crypto_scalarmult_curve25519( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int1966 pub fn crypto_scalarmult_curve25519( 1967 q: *mut libc::c_uchar, 1968 n: *const libc::c_uchar, 1969 p: *const libc::c_uchar, 1970 ) -> libc::c_int; 1971 } 1972 extern "C" { crypto_scalarmult_curve25519_base( q: *mut libc::c_uchar, n: *const libc::c_uchar, ) -> libc::c_int1973 pub fn crypto_scalarmult_curve25519_base( 1974 q: *mut libc::c_uchar, 1975 n: *const libc::c_uchar, 1976 ) -> libc::c_int; 1977 } 1978 extern "C" { crypto_scalarmult_bytes() -> usize1979 pub fn crypto_scalarmult_bytes() -> usize; 1980 } 1981 extern "C" { crypto_scalarmult_scalarbytes() -> usize1982 pub fn crypto_scalarmult_scalarbytes() -> usize; 1983 } 1984 extern "C" { crypto_scalarmult_primitive() -> *const libc::c_char1985 pub fn crypto_scalarmult_primitive() -> *const libc::c_char; 1986 } 1987 extern "C" { crypto_scalarmult_base(q: *mut libc::c_uchar, n: *const libc::c_uchar) -> libc::c_int1988 pub fn crypto_scalarmult_base(q: *mut libc::c_uchar, n: *const libc::c_uchar) -> libc::c_int; 1989 } 1990 extern "C" { crypto_scalarmult( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int1991 pub fn crypto_scalarmult( 1992 q: *mut libc::c_uchar, 1993 n: *const libc::c_uchar, 1994 p: *const libc::c_uchar, 1995 ) -> libc::c_int; 1996 } 1997 extern "C" { crypto_secretbox_xsalsa20poly1305_keybytes() -> usize1998 pub fn crypto_secretbox_xsalsa20poly1305_keybytes() -> usize; 1999 } 2000 extern "C" { crypto_secretbox_xsalsa20poly1305_noncebytes() -> usize2001 pub fn crypto_secretbox_xsalsa20poly1305_noncebytes() -> usize; 2002 } 2003 extern "C" { crypto_secretbox_xsalsa20poly1305_macbytes() -> usize2004 pub fn crypto_secretbox_xsalsa20poly1305_macbytes() -> usize; 2005 } 2006 extern "C" { crypto_secretbox_xsalsa20poly1305_messagebytes_max() -> usize2007 pub fn crypto_secretbox_xsalsa20poly1305_messagebytes_max() -> usize; 2008 } 2009 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_int2010 pub fn crypto_secretbox_xsalsa20poly1305( 2011 c: *mut libc::c_uchar, 2012 m: *const libc::c_uchar, 2013 mlen: libc::c_ulonglong, 2014 n: *const libc::c_uchar, 2015 k: *const libc::c_uchar, 2016 ) -> libc::c_int; 2017 } 2018 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_int2019 pub fn crypto_secretbox_xsalsa20poly1305_open( 2020 m: *mut libc::c_uchar, 2021 c: *const libc::c_uchar, 2022 clen: libc::c_ulonglong, 2023 n: *const libc::c_uchar, 2024 k: *const libc::c_uchar, 2025 ) -> libc::c_int; 2026 } 2027 extern "C" { crypto_secretbox_xsalsa20poly1305_keygen(k: *mut libc::c_uchar)2028 pub fn crypto_secretbox_xsalsa20poly1305_keygen(k: *mut libc::c_uchar); 2029 } 2030 extern "C" { crypto_secretbox_xsalsa20poly1305_boxzerobytes() -> usize2031 pub fn crypto_secretbox_xsalsa20poly1305_boxzerobytes() -> usize; 2032 } 2033 extern "C" { crypto_secretbox_xsalsa20poly1305_zerobytes() -> usize2034 pub fn crypto_secretbox_xsalsa20poly1305_zerobytes() -> usize; 2035 } 2036 extern "C" { crypto_secretbox_keybytes() -> usize2037 pub fn crypto_secretbox_keybytes() -> usize; 2038 } 2039 extern "C" { crypto_secretbox_noncebytes() -> usize2040 pub fn crypto_secretbox_noncebytes() -> usize; 2041 } 2042 extern "C" { crypto_secretbox_macbytes() -> usize2043 pub fn crypto_secretbox_macbytes() -> usize; 2044 } 2045 extern "C" { crypto_secretbox_primitive() -> *const libc::c_char2046 pub fn crypto_secretbox_primitive() -> *const libc::c_char; 2047 } 2048 extern "C" { crypto_secretbox_messagebytes_max() -> usize2049 pub fn crypto_secretbox_messagebytes_max() -> usize; 2050 } 2051 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_int2052 pub fn crypto_secretbox_easy( 2053 c: *mut libc::c_uchar, 2054 m: *const libc::c_uchar, 2055 mlen: libc::c_ulonglong, 2056 n: *const libc::c_uchar, 2057 k: *const libc::c_uchar, 2058 ) -> libc::c_int; 2059 } 2060 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_int2061 pub fn crypto_secretbox_open_easy( 2062 m: *mut libc::c_uchar, 2063 c: *const libc::c_uchar, 2064 clen: libc::c_ulonglong, 2065 n: *const libc::c_uchar, 2066 k: *const libc::c_uchar, 2067 ) -> libc::c_int; 2068 } 2069 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_int2070 pub fn crypto_secretbox_detached( 2071 c: *mut libc::c_uchar, 2072 mac: *mut libc::c_uchar, 2073 m: *const libc::c_uchar, 2074 mlen: libc::c_ulonglong, 2075 n: *const libc::c_uchar, 2076 k: *const libc::c_uchar, 2077 ) -> libc::c_int; 2078 } 2079 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_int2080 pub fn crypto_secretbox_open_detached( 2081 m: *mut libc::c_uchar, 2082 c: *const libc::c_uchar, 2083 mac: *const libc::c_uchar, 2084 clen: libc::c_ulonglong, 2085 n: *const libc::c_uchar, 2086 k: *const libc::c_uchar, 2087 ) -> libc::c_int; 2088 } 2089 extern "C" { crypto_secretbox_keygen(k: *mut libc::c_uchar)2090 pub fn crypto_secretbox_keygen(k: *mut libc::c_uchar); 2091 } 2092 extern "C" { crypto_secretbox_zerobytes() -> usize2093 pub fn crypto_secretbox_zerobytes() -> usize; 2094 } 2095 extern "C" { crypto_secretbox_boxzerobytes() -> usize2096 pub fn crypto_secretbox_boxzerobytes() -> usize; 2097 } 2098 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_int2099 pub fn crypto_secretbox( 2100 c: *mut libc::c_uchar, 2101 m: *const libc::c_uchar, 2102 mlen: libc::c_ulonglong, 2103 n: *const libc::c_uchar, 2104 k: *const libc::c_uchar, 2105 ) -> libc::c_int; 2106 } 2107 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_int2108 pub fn crypto_secretbox_open( 2109 m: *mut libc::c_uchar, 2110 c: *const libc::c_uchar, 2111 clen: libc::c_ulonglong, 2112 n: *const libc::c_uchar, 2113 k: *const libc::c_uchar, 2114 ) -> libc::c_int; 2115 } 2116 extern "C" { crypto_stream_chacha20_keybytes() -> usize2117 pub fn crypto_stream_chacha20_keybytes() -> usize; 2118 } 2119 extern "C" { crypto_stream_chacha20_noncebytes() -> usize2120 pub fn crypto_stream_chacha20_noncebytes() -> usize; 2121 } 2122 extern "C" { crypto_stream_chacha20_messagebytes_max() -> usize2123 pub fn crypto_stream_chacha20_messagebytes_max() -> usize; 2124 } 2125 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_int2126 pub fn crypto_stream_chacha20( 2127 c: *mut libc::c_uchar, 2128 clen: libc::c_ulonglong, 2129 n: *const libc::c_uchar, 2130 k: *const libc::c_uchar, 2131 ) -> libc::c_int; 2132 } 2133 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_int2134 pub fn crypto_stream_chacha20_xor( 2135 c: *mut libc::c_uchar, 2136 m: *const libc::c_uchar, 2137 mlen: libc::c_ulonglong, 2138 n: *const libc::c_uchar, 2139 k: *const libc::c_uchar, 2140 ) -> libc::c_int; 2141 } 2142 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_int2143 pub fn crypto_stream_chacha20_xor_ic( 2144 c: *mut libc::c_uchar, 2145 m: *const libc::c_uchar, 2146 mlen: libc::c_ulonglong, 2147 n: *const libc::c_uchar, 2148 ic: u64, 2149 k: *const libc::c_uchar, 2150 ) -> libc::c_int; 2151 } 2152 extern "C" { crypto_stream_chacha20_keygen(k: *mut libc::c_uchar)2153 pub fn crypto_stream_chacha20_keygen(k: *mut libc::c_uchar); 2154 } 2155 extern "C" { crypto_stream_chacha20_ietf_keybytes() -> usize2156 pub fn crypto_stream_chacha20_ietf_keybytes() -> usize; 2157 } 2158 extern "C" { crypto_stream_chacha20_ietf_noncebytes() -> usize2159 pub fn crypto_stream_chacha20_ietf_noncebytes() -> usize; 2160 } 2161 extern "C" { crypto_stream_chacha20_ietf_messagebytes_max() -> usize2162 pub fn crypto_stream_chacha20_ietf_messagebytes_max() -> usize; 2163 } 2164 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_int2165 pub fn crypto_stream_chacha20_ietf( 2166 c: *mut libc::c_uchar, 2167 clen: libc::c_ulonglong, 2168 n: *const libc::c_uchar, 2169 k: *const libc::c_uchar, 2170 ) -> libc::c_int; 2171 } 2172 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_int2173 pub fn crypto_stream_chacha20_ietf_xor( 2174 c: *mut libc::c_uchar, 2175 m: *const libc::c_uchar, 2176 mlen: libc::c_ulonglong, 2177 n: *const libc::c_uchar, 2178 k: *const libc::c_uchar, 2179 ) -> libc::c_int; 2180 } 2181 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_int2182 pub fn crypto_stream_chacha20_ietf_xor_ic( 2183 c: *mut libc::c_uchar, 2184 m: *const libc::c_uchar, 2185 mlen: libc::c_ulonglong, 2186 n: *const libc::c_uchar, 2187 ic: u32, 2188 k: *const libc::c_uchar, 2189 ) -> libc::c_int; 2190 } 2191 extern "C" { crypto_stream_chacha20_ietf_keygen(k: *mut libc::c_uchar)2192 pub fn crypto_stream_chacha20_ietf_keygen(k: *mut libc::c_uchar); 2193 } 2194 extern "C" { crypto_secretstream_xchacha20poly1305_abytes() -> usize2195 pub fn crypto_secretstream_xchacha20poly1305_abytes() -> usize; 2196 } 2197 extern "C" { crypto_secretstream_xchacha20poly1305_headerbytes() -> usize2198 pub fn crypto_secretstream_xchacha20poly1305_headerbytes() -> usize; 2199 } 2200 extern "C" { crypto_secretstream_xchacha20poly1305_keybytes() -> usize2201 pub fn crypto_secretstream_xchacha20poly1305_keybytes() -> usize; 2202 } 2203 extern "C" { crypto_secretstream_xchacha20poly1305_messagebytes_max() -> usize2204 pub fn crypto_secretstream_xchacha20poly1305_messagebytes_max() -> usize; 2205 } 2206 extern "C" { crypto_secretstream_xchacha20poly1305_tag_message() -> libc::c_uchar2207 pub fn crypto_secretstream_xchacha20poly1305_tag_message() -> libc::c_uchar; 2208 } 2209 extern "C" { crypto_secretstream_xchacha20poly1305_tag_push() -> libc::c_uchar2210 pub fn crypto_secretstream_xchacha20poly1305_tag_push() -> libc::c_uchar; 2211 } 2212 extern "C" { crypto_secretstream_xchacha20poly1305_tag_rekey() -> libc::c_uchar2213 pub fn crypto_secretstream_xchacha20poly1305_tag_rekey() -> libc::c_uchar; 2214 } 2215 extern "C" { crypto_secretstream_xchacha20poly1305_tag_final() -> libc::c_uchar2216 pub fn crypto_secretstream_xchacha20poly1305_tag_final() -> libc::c_uchar; 2217 } 2218 #[repr(C)] 2219 #[derive(Debug, Copy, Clone)] 2220 pub struct crypto_secretstream_xchacha20poly1305_state { 2221 pub k: [libc::c_uchar; 32usize], 2222 pub nonce: [libc::c_uchar; 12usize], 2223 pub _pad: [libc::c_uchar; 8usize], 2224 } 2225 extern "C" { crypto_secretstream_xchacha20poly1305_statebytes() -> usize2226 pub fn crypto_secretstream_xchacha20poly1305_statebytes() -> usize; 2227 } 2228 extern "C" { crypto_secretstream_xchacha20poly1305_keygen(k: *mut libc::c_uchar)2229 pub fn crypto_secretstream_xchacha20poly1305_keygen(k: *mut libc::c_uchar); 2230 } 2231 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_int2232 pub fn crypto_secretstream_xchacha20poly1305_init_push( 2233 state: *mut crypto_secretstream_xchacha20poly1305_state, 2234 header: *mut libc::c_uchar, 2235 k: *const libc::c_uchar, 2236 ) -> libc::c_int; 2237 } 2238 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_int2239 pub fn crypto_secretstream_xchacha20poly1305_push( 2240 state: *mut crypto_secretstream_xchacha20poly1305_state, 2241 c: *mut libc::c_uchar, 2242 clen_p: *mut libc::c_ulonglong, 2243 m: *const libc::c_uchar, 2244 mlen: libc::c_ulonglong, 2245 ad: *const libc::c_uchar, 2246 adlen: libc::c_ulonglong, 2247 tag: libc::c_uchar, 2248 ) -> libc::c_int; 2249 } 2250 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_int2251 pub fn crypto_secretstream_xchacha20poly1305_init_pull( 2252 state: *mut crypto_secretstream_xchacha20poly1305_state, 2253 header: *const libc::c_uchar, 2254 k: *const libc::c_uchar, 2255 ) -> libc::c_int; 2256 } 2257 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_int2258 pub fn crypto_secretstream_xchacha20poly1305_pull( 2259 state: *mut crypto_secretstream_xchacha20poly1305_state, 2260 m: *mut libc::c_uchar, 2261 mlen_p: *mut libc::c_ulonglong, 2262 tag_p: *mut libc::c_uchar, 2263 c: *const libc::c_uchar, 2264 clen: libc::c_ulonglong, 2265 ad: *const libc::c_uchar, 2266 adlen: libc::c_ulonglong, 2267 ) -> libc::c_int; 2268 } 2269 extern "C" { crypto_secretstream_xchacha20poly1305_rekey( state: *mut crypto_secretstream_xchacha20poly1305_state, )2270 pub fn crypto_secretstream_xchacha20poly1305_rekey( 2271 state: *mut crypto_secretstream_xchacha20poly1305_state, 2272 ); 2273 } 2274 extern "C" { crypto_shorthash_siphash24_bytes() -> usize2275 pub fn crypto_shorthash_siphash24_bytes() -> usize; 2276 } 2277 extern "C" { crypto_shorthash_siphash24_keybytes() -> usize2278 pub fn crypto_shorthash_siphash24_keybytes() -> usize; 2279 } 2280 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_int2281 pub fn crypto_shorthash_siphash24( 2282 out: *mut libc::c_uchar, 2283 in_: *const libc::c_uchar, 2284 inlen: libc::c_ulonglong, 2285 k: *const libc::c_uchar, 2286 ) -> libc::c_int; 2287 } 2288 extern "C" { crypto_shorthash_siphashx24_bytes() -> usize2289 pub fn crypto_shorthash_siphashx24_bytes() -> usize; 2290 } 2291 extern "C" { crypto_shorthash_siphashx24_keybytes() -> usize2292 pub fn crypto_shorthash_siphashx24_keybytes() -> usize; 2293 } 2294 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_int2295 pub fn crypto_shorthash_siphashx24( 2296 out: *mut libc::c_uchar, 2297 in_: *const libc::c_uchar, 2298 inlen: libc::c_ulonglong, 2299 k: *const libc::c_uchar, 2300 ) -> libc::c_int; 2301 } 2302 extern "C" { crypto_shorthash_bytes() -> usize2303 pub fn crypto_shorthash_bytes() -> usize; 2304 } 2305 extern "C" { crypto_shorthash_keybytes() -> usize2306 pub fn crypto_shorthash_keybytes() -> usize; 2307 } 2308 extern "C" { crypto_shorthash_primitive() -> *const libc::c_char2309 pub fn crypto_shorthash_primitive() -> *const libc::c_char; 2310 } 2311 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_int2312 pub fn crypto_shorthash( 2313 out: *mut libc::c_uchar, 2314 in_: *const libc::c_uchar, 2315 inlen: libc::c_ulonglong, 2316 k: *const libc::c_uchar, 2317 ) -> libc::c_int; 2318 } 2319 extern "C" { crypto_shorthash_keygen(k: *mut libc::c_uchar)2320 pub fn crypto_shorthash_keygen(k: *mut libc::c_uchar); 2321 } 2322 #[repr(C)] 2323 #[derive(Copy, Clone)] 2324 pub struct crypto_sign_ed25519ph_state { 2325 pub hs: crypto_hash_sha512_state, 2326 } 2327 extern "C" { crypto_sign_ed25519ph_statebytes() -> usize2328 pub fn crypto_sign_ed25519ph_statebytes() -> usize; 2329 } 2330 extern "C" { crypto_sign_ed25519_bytes() -> usize2331 pub fn crypto_sign_ed25519_bytes() -> usize; 2332 } 2333 extern "C" { crypto_sign_ed25519_seedbytes() -> usize2334 pub fn crypto_sign_ed25519_seedbytes() -> usize; 2335 } 2336 extern "C" { crypto_sign_ed25519_publickeybytes() -> usize2337 pub fn crypto_sign_ed25519_publickeybytes() -> usize; 2338 } 2339 extern "C" { crypto_sign_ed25519_secretkeybytes() -> usize2340 pub fn crypto_sign_ed25519_secretkeybytes() -> usize; 2341 } 2342 extern "C" { crypto_sign_ed25519_messagebytes_max() -> usize2343 pub fn crypto_sign_ed25519_messagebytes_max() -> usize; 2344 } 2345 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_int2346 pub fn crypto_sign_ed25519( 2347 sm: *mut libc::c_uchar, 2348 smlen_p: *mut libc::c_ulonglong, 2349 m: *const libc::c_uchar, 2350 mlen: libc::c_ulonglong, 2351 sk: *const libc::c_uchar, 2352 ) -> libc::c_int; 2353 } 2354 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_int2355 pub fn crypto_sign_ed25519_open( 2356 m: *mut libc::c_uchar, 2357 mlen_p: *mut libc::c_ulonglong, 2358 sm: *const libc::c_uchar, 2359 smlen: libc::c_ulonglong, 2360 pk: *const libc::c_uchar, 2361 ) -> libc::c_int; 2362 } 2363 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_int2364 pub fn crypto_sign_ed25519_detached( 2365 sig: *mut libc::c_uchar, 2366 siglen_p: *mut libc::c_ulonglong, 2367 m: *const libc::c_uchar, 2368 mlen: libc::c_ulonglong, 2369 sk: *const libc::c_uchar, 2370 ) -> libc::c_int; 2371 } 2372 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_int2373 pub fn crypto_sign_ed25519_verify_detached( 2374 sig: *const libc::c_uchar, 2375 m: *const libc::c_uchar, 2376 mlen: libc::c_ulonglong, 2377 pk: *const libc::c_uchar, 2378 ) -> libc::c_int; 2379 } 2380 extern "C" { crypto_sign_ed25519_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, ) -> libc::c_int2381 pub fn crypto_sign_ed25519_keypair( 2382 pk: *mut libc::c_uchar, 2383 sk: *mut libc::c_uchar, 2384 ) -> libc::c_int; 2385 } 2386 extern "C" { crypto_sign_ed25519_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int2387 pub fn crypto_sign_ed25519_seed_keypair( 2388 pk: *mut libc::c_uchar, 2389 sk: *mut libc::c_uchar, 2390 seed: *const libc::c_uchar, 2391 ) -> libc::c_int; 2392 } 2393 extern "C" { crypto_sign_ed25519_pk_to_curve25519( curve25519_pk: *mut libc::c_uchar, ed25519_pk: *const libc::c_uchar, ) -> libc::c_int2394 pub fn crypto_sign_ed25519_pk_to_curve25519( 2395 curve25519_pk: *mut libc::c_uchar, 2396 ed25519_pk: *const libc::c_uchar, 2397 ) -> libc::c_int; 2398 } 2399 extern "C" { crypto_sign_ed25519_sk_to_curve25519( curve25519_sk: *mut libc::c_uchar, ed25519_sk: *const libc::c_uchar, ) -> libc::c_int2400 pub fn crypto_sign_ed25519_sk_to_curve25519( 2401 curve25519_sk: *mut libc::c_uchar, 2402 ed25519_sk: *const libc::c_uchar, 2403 ) -> libc::c_int; 2404 } 2405 extern "C" { crypto_sign_ed25519_sk_to_seed( seed: *mut libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int2406 pub fn crypto_sign_ed25519_sk_to_seed( 2407 seed: *mut libc::c_uchar, 2408 sk: *const libc::c_uchar, 2409 ) -> libc::c_int; 2410 } 2411 extern "C" { crypto_sign_ed25519_sk_to_pk( pk: *mut libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int2412 pub fn crypto_sign_ed25519_sk_to_pk( 2413 pk: *mut libc::c_uchar, 2414 sk: *const libc::c_uchar, 2415 ) -> libc::c_int; 2416 } 2417 extern "C" { crypto_sign_ed25519ph_init(state: *mut crypto_sign_ed25519ph_state) -> libc::c_int2418 pub fn crypto_sign_ed25519ph_init(state: *mut crypto_sign_ed25519ph_state) -> libc::c_int; 2419 } 2420 extern "C" { crypto_sign_ed25519ph_update( state: *mut crypto_sign_ed25519ph_state, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ) -> libc::c_int2421 pub fn crypto_sign_ed25519ph_update( 2422 state: *mut crypto_sign_ed25519ph_state, 2423 m: *const libc::c_uchar, 2424 mlen: libc::c_ulonglong, 2425 ) -> libc::c_int; 2426 } 2427 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_int2428 pub fn crypto_sign_ed25519ph_final_create( 2429 state: *mut crypto_sign_ed25519ph_state, 2430 sig: *mut libc::c_uchar, 2431 siglen_p: *mut libc::c_ulonglong, 2432 sk: *const libc::c_uchar, 2433 ) -> libc::c_int; 2434 } 2435 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_int2436 pub fn crypto_sign_ed25519ph_final_verify( 2437 state: *mut crypto_sign_ed25519ph_state, 2438 sig: *const libc::c_uchar, 2439 pk: *const libc::c_uchar, 2440 ) -> libc::c_int; 2441 } 2442 pub type crypto_sign_state = crypto_sign_ed25519ph_state; 2443 extern "C" { crypto_sign_statebytes() -> usize2444 pub fn crypto_sign_statebytes() -> usize; 2445 } 2446 extern "C" { crypto_sign_bytes() -> usize2447 pub fn crypto_sign_bytes() -> usize; 2448 } 2449 extern "C" { crypto_sign_seedbytes() -> usize2450 pub fn crypto_sign_seedbytes() -> usize; 2451 } 2452 extern "C" { crypto_sign_publickeybytes() -> usize2453 pub fn crypto_sign_publickeybytes() -> usize; 2454 } 2455 extern "C" { crypto_sign_secretkeybytes() -> usize2456 pub fn crypto_sign_secretkeybytes() -> usize; 2457 } 2458 extern "C" { crypto_sign_messagebytes_max() -> usize2459 pub fn crypto_sign_messagebytes_max() -> usize; 2460 } 2461 extern "C" { crypto_sign_primitive() -> *const libc::c_char2462 pub fn crypto_sign_primitive() -> *const libc::c_char; 2463 } 2464 extern "C" { crypto_sign_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int2465 pub fn crypto_sign_seed_keypair( 2466 pk: *mut libc::c_uchar, 2467 sk: *mut libc::c_uchar, 2468 seed: *const libc::c_uchar, 2469 ) -> libc::c_int; 2470 } 2471 extern "C" { crypto_sign_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int2472 pub fn crypto_sign_keypair(pk: *mut libc::c_uchar, sk: *mut libc::c_uchar) -> libc::c_int; 2473 } 2474 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_int2475 pub fn crypto_sign( 2476 sm: *mut libc::c_uchar, 2477 smlen_p: *mut libc::c_ulonglong, 2478 m: *const libc::c_uchar, 2479 mlen: libc::c_ulonglong, 2480 sk: *const libc::c_uchar, 2481 ) -> libc::c_int; 2482 } 2483 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_int2484 pub fn crypto_sign_open( 2485 m: *mut libc::c_uchar, 2486 mlen_p: *mut libc::c_ulonglong, 2487 sm: *const libc::c_uchar, 2488 smlen: libc::c_ulonglong, 2489 pk: *const libc::c_uchar, 2490 ) -> libc::c_int; 2491 } 2492 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_int2493 pub fn crypto_sign_detached( 2494 sig: *mut libc::c_uchar, 2495 siglen_p: *mut libc::c_ulonglong, 2496 m: *const libc::c_uchar, 2497 mlen: libc::c_ulonglong, 2498 sk: *const libc::c_uchar, 2499 ) -> libc::c_int; 2500 } 2501 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_int2502 pub fn crypto_sign_verify_detached( 2503 sig: *const libc::c_uchar, 2504 m: *const libc::c_uchar, 2505 mlen: libc::c_ulonglong, 2506 pk: *const libc::c_uchar, 2507 ) -> libc::c_int; 2508 } 2509 extern "C" { crypto_sign_init(state: *mut crypto_sign_state) -> libc::c_int2510 pub fn crypto_sign_init(state: *mut crypto_sign_state) -> libc::c_int; 2511 } 2512 extern "C" { crypto_sign_update( state: *mut crypto_sign_state, m: *const libc::c_uchar, mlen: libc::c_ulonglong, ) -> libc::c_int2513 pub fn crypto_sign_update( 2514 state: *mut crypto_sign_state, 2515 m: *const libc::c_uchar, 2516 mlen: libc::c_ulonglong, 2517 ) -> libc::c_int; 2518 } 2519 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_int2520 pub fn crypto_sign_final_create( 2521 state: *mut crypto_sign_state, 2522 sig: *mut libc::c_uchar, 2523 siglen_p: *mut libc::c_ulonglong, 2524 sk: *const libc::c_uchar, 2525 ) -> libc::c_int; 2526 } 2527 extern "C" { crypto_sign_final_verify( state: *mut crypto_sign_state, sig: *const libc::c_uchar, pk: *const libc::c_uchar, ) -> libc::c_int2528 pub fn crypto_sign_final_verify( 2529 state: *mut crypto_sign_state, 2530 sig: *const libc::c_uchar, 2531 pk: *const libc::c_uchar, 2532 ) -> libc::c_int; 2533 } 2534 extern "C" { crypto_stream_keybytes() -> usize2535 pub fn crypto_stream_keybytes() -> usize; 2536 } 2537 extern "C" { crypto_stream_noncebytes() -> usize2538 pub fn crypto_stream_noncebytes() -> usize; 2539 } 2540 extern "C" { crypto_stream_messagebytes_max() -> usize2541 pub fn crypto_stream_messagebytes_max() -> usize; 2542 } 2543 extern "C" { crypto_stream_primitive() -> *const libc::c_char2544 pub fn crypto_stream_primitive() -> *const libc::c_char; 2545 } 2546 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_int2547 pub fn crypto_stream( 2548 c: *mut libc::c_uchar, 2549 clen: libc::c_ulonglong, 2550 n: *const libc::c_uchar, 2551 k: *const libc::c_uchar, 2552 ) -> libc::c_int; 2553 } 2554 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_int2555 pub fn crypto_stream_xor( 2556 c: *mut libc::c_uchar, 2557 m: *const libc::c_uchar, 2558 mlen: libc::c_ulonglong, 2559 n: *const libc::c_uchar, 2560 k: *const libc::c_uchar, 2561 ) -> libc::c_int; 2562 } 2563 extern "C" { crypto_stream_keygen(k: *mut libc::c_uchar)2564 pub fn crypto_stream_keygen(k: *mut libc::c_uchar); 2565 } 2566 extern "C" { crypto_stream_salsa20_keybytes() -> usize2567 pub fn crypto_stream_salsa20_keybytes() -> usize; 2568 } 2569 extern "C" { crypto_stream_salsa20_noncebytes() -> usize2570 pub fn crypto_stream_salsa20_noncebytes() -> usize; 2571 } 2572 extern "C" { crypto_stream_salsa20_messagebytes_max() -> usize2573 pub fn crypto_stream_salsa20_messagebytes_max() -> usize; 2574 } 2575 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_int2576 pub fn crypto_stream_salsa20( 2577 c: *mut libc::c_uchar, 2578 clen: libc::c_ulonglong, 2579 n: *const libc::c_uchar, 2580 k: *const libc::c_uchar, 2581 ) -> libc::c_int; 2582 } 2583 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_int2584 pub fn crypto_stream_salsa20_xor( 2585 c: *mut libc::c_uchar, 2586 m: *const libc::c_uchar, 2587 mlen: libc::c_ulonglong, 2588 n: *const libc::c_uchar, 2589 k: *const libc::c_uchar, 2590 ) -> libc::c_int; 2591 } 2592 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_int2593 pub fn crypto_stream_salsa20_xor_ic( 2594 c: *mut libc::c_uchar, 2595 m: *const libc::c_uchar, 2596 mlen: libc::c_ulonglong, 2597 n: *const libc::c_uchar, 2598 ic: u64, 2599 k: *const libc::c_uchar, 2600 ) -> libc::c_int; 2601 } 2602 extern "C" { crypto_stream_salsa20_keygen(k: *mut libc::c_uchar)2603 pub fn crypto_stream_salsa20_keygen(k: *mut libc::c_uchar); 2604 } 2605 extern "C" { crypto_verify_16_bytes() -> usize2606 pub fn crypto_verify_16_bytes() -> usize; 2607 } 2608 extern "C" { crypto_verify_16(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int2609 pub fn crypto_verify_16(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int; 2610 } 2611 extern "C" { crypto_verify_32_bytes() -> usize2612 pub fn crypto_verify_32_bytes() -> usize; 2613 } 2614 extern "C" { crypto_verify_32(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int2615 pub fn crypto_verify_32(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int; 2616 } 2617 extern "C" { crypto_verify_64_bytes() -> usize2618 pub fn crypto_verify_64_bytes() -> usize; 2619 } 2620 extern "C" { crypto_verify_64(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int2621 pub fn crypto_verify_64(x: *const libc::c_uchar, y: *const libc::c_uchar) -> libc::c_int; 2622 } 2623 #[repr(C)] 2624 #[derive(Debug, Copy, Clone)] 2625 pub struct randombytes_implementation { 2626 pub implementation_name: ::core::option::Option<unsafe extern "C" fn() -> *const libc::c_char>, 2627 pub random: ::core::option::Option<unsafe extern "C" fn() -> u32>, 2628 pub stir: ::core::option::Option<unsafe extern "C" fn()>, 2629 pub uniform: ::core::option::Option<unsafe extern "C" fn(upper_bound: u32) -> u32>, 2630 pub buf: ::core::option::Option<unsafe extern "C" fn(buf: *mut libc::c_void, size: usize)>, 2631 pub close: ::core::option::Option<unsafe extern "C" fn() -> libc::c_int>, 2632 } 2633 extern "C" { randombytes_seedbytes() -> usize2634 pub fn randombytes_seedbytes() -> usize; 2635 } 2636 extern "C" { randombytes_buf(buf: *mut libc::c_void, size: usize)2637 pub fn randombytes_buf(buf: *mut libc::c_void, size: usize); 2638 } 2639 extern "C" { randombytes_buf_deterministic( buf: *mut libc::c_void, size: usize, seed: *const libc::c_uchar, )2640 pub fn randombytes_buf_deterministic( 2641 buf: *mut libc::c_void, 2642 size: usize, 2643 seed: *const libc::c_uchar, 2644 ); 2645 } 2646 extern "C" { randombytes_random() -> u322647 pub fn randombytes_random() -> u32; 2648 } 2649 extern "C" { randombytes_uniform(upper_bound: u32) -> u322650 pub fn randombytes_uniform(upper_bound: u32) -> u32; 2651 } 2652 extern "C" { randombytes_stir()2653 pub fn randombytes_stir(); 2654 } 2655 extern "C" { randombytes_close() -> libc::c_int2656 pub fn randombytes_close() -> libc::c_int; 2657 } 2658 extern "C" { randombytes_set_implementation(impl_: *mut randombytes_implementation) -> libc::c_int2659 pub fn randombytes_set_implementation(impl_: *mut randombytes_implementation) -> libc::c_int; 2660 } 2661 extern "C" { randombytes_implementation_name() -> *const libc::c_char2662 pub fn randombytes_implementation_name() -> *const libc::c_char; 2663 } 2664 extern "C" { 2665 pub static mut randombytes_internal_implementation: randombytes_implementation; 2666 } 2667 extern "C" { 2668 pub static mut randombytes_sysrandom_implementation: randombytes_implementation; 2669 } 2670 extern "C" { sodium_runtime_has_neon() -> libc::c_int2671 pub fn sodium_runtime_has_neon() -> libc::c_int; 2672 } 2673 extern "C" { sodium_runtime_has_sse2() -> libc::c_int2674 pub fn sodium_runtime_has_sse2() -> libc::c_int; 2675 } 2676 extern "C" { sodium_runtime_has_sse3() -> libc::c_int2677 pub fn sodium_runtime_has_sse3() -> libc::c_int; 2678 } 2679 extern "C" { sodium_runtime_has_ssse3() -> libc::c_int2680 pub fn sodium_runtime_has_ssse3() -> libc::c_int; 2681 } 2682 extern "C" { sodium_runtime_has_sse41() -> libc::c_int2683 pub fn sodium_runtime_has_sse41() -> libc::c_int; 2684 } 2685 extern "C" { sodium_runtime_has_avx() -> libc::c_int2686 pub fn sodium_runtime_has_avx() -> libc::c_int; 2687 } 2688 extern "C" { sodium_runtime_has_avx2() -> libc::c_int2689 pub fn sodium_runtime_has_avx2() -> libc::c_int; 2690 } 2691 extern "C" { sodium_runtime_has_avx512f() -> libc::c_int2692 pub fn sodium_runtime_has_avx512f() -> libc::c_int; 2693 } 2694 extern "C" { sodium_runtime_has_pclmul() -> libc::c_int2695 pub fn sodium_runtime_has_pclmul() -> libc::c_int; 2696 } 2697 extern "C" { sodium_runtime_has_aesni() -> libc::c_int2698 pub fn sodium_runtime_has_aesni() -> libc::c_int; 2699 } 2700 extern "C" { sodium_runtime_has_rdrand() -> libc::c_int2701 pub fn sodium_runtime_has_rdrand() -> libc::c_int; 2702 } 2703 extern "C" { sodium_memzero(pnt: *mut libc::c_void, len: usize)2704 pub fn sodium_memzero(pnt: *mut libc::c_void, len: usize); 2705 } 2706 extern "C" { sodium_stackzero(len: usize)2707 pub fn sodium_stackzero(len: usize); 2708 } 2709 extern "C" { sodium_memcmp( b1_: *const libc::c_void, b2_: *const libc::c_void, len: usize, ) -> libc::c_int2710 pub fn sodium_memcmp( 2711 b1_: *const libc::c_void, 2712 b2_: *const libc::c_void, 2713 len: usize, 2714 ) -> libc::c_int; 2715 } 2716 extern "C" { sodium_compare( b1_: *const libc::c_uchar, b2_: *const libc::c_uchar, len: usize, ) -> libc::c_int2717 pub fn sodium_compare( 2718 b1_: *const libc::c_uchar, 2719 b2_: *const libc::c_uchar, 2720 len: usize, 2721 ) -> libc::c_int; 2722 } 2723 extern "C" { sodium_is_zero(n: *const libc::c_uchar, nlen: usize) -> libc::c_int2724 pub fn sodium_is_zero(n: *const libc::c_uchar, nlen: usize) -> libc::c_int; 2725 } 2726 extern "C" { sodium_increment(n: *mut libc::c_uchar, nlen: usize)2727 pub fn sodium_increment(n: *mut libc::c_uchar, nlen: usize); 2728 } 2729 extern "C" { sodium_add(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize)2730 pub fn sodium_add(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize); 2731 } 2732 extern "C" { sodium_sub(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize)2733 pub fn sodium_sub(a: *mut libc::c_uchar, b: *const libc::c_uchar, len: usize); 2734 } 2735 extern "C" { sodium_bin2hex( hex: *mut libc::c_char, hex_maxlen: usize, bin: *const libc::c_uchar, bin_len: usize, ) -> *mut libc::c_char2736 pub fn sodium_bin2hex( 2737 hex: *mut libc::c_char, 2738 hex_maxlen: usize, 2739 bin: *const libc::c_uchar, 2740 bin_len: usize, 2741 ) -> *mut libc::c_char; 2742 } 2743 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_int2744 pub fn sodium_hex2bin( 2745 bin: *mut libc::c_uchar, 2746 bin_maxlen: usize, 2747 hex: *const libc::c_char, 2748 hex_len: usize, 2749 ignore: *const libc::c_char, 2750 bin_len: *mut usize, 2751 hex_end: *mut *const libc::c_char, 2752 ) -> libc::c_int; 2753 } 2754 extern "C" { sodium_base64_encoded_len(bin_len: usize, variant: libc::c_int) -> usize2755 pub fn sodium_base64_encoded_len(bin_len: usize, variant: libc::c_int) -> usize; 2756 } 2757 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_char2758 pub fn sodium_bin2base64( 2759 b64: *mut libc::c_char, 2760 b64_maxlen: usize, 2761 bin: *const libc::c_uchar, 2762 bin_len: usize, 2763 variant: libc::c_int, 2764 ) -> *mut libc::c_char; 2765 } 2766 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_int2767 pub fn sodium_base642bin( 2768 bin: *mut libc::c_uchar, 2769 bin_maxlen: usize, 2770 b64: *const libc::c_char, 2771 b64_len: usize, 2772 ignore: *const libc::c_char, 2773 bin_len: *mut usize, 2774 b64_end: *mut *const libc::c_char, 2775 variant: libc::c_int, 2776 ) -> libc::c_int; 2777 } 2778 extern "C" { sodium_mlock(addr: *mut libc::c_void, len: usize) -> libc::c_int2779 pub fn sodium_mlock(addr: *mut libc::c_void, len: usize) -> libc::c_int; 2780 } 2781 extern "C" { sodium_munlock(addr: *mut libc::c_void, len: usize) -> libc::c_int2782 pub fn sodium_munlock(addr: *mut libc::c_void, len: usize) -> libc::c_int; 2783 } 2784 extern "C" { sodium_malloc(size: usize) -> *mut libc::c_void2785 pub fn sodium_malloc(size: usize) -> *mut libc::c_void; 2786 } 2787 extern "C" { sodium_allocarray(count: usize, size: usize) -> *mut libc::c_void2788 pub fn sodium_allocarray(count: usize, size: usize) -> *mut libc::c_void; 2789 } 2790 extern "C" { sodium_free(ptr: *mut libc::c_void)2791 pub fn sodium_free(ptr: *mut libc::c_void); 2792 } 2793 extern "C" { sodium_mprotect_noaccess(ptr: *mut libc::c_void) -> libc::c_int2794 pub fn sodium_mprotect_noaccess(ptr: *mut libc::c_void) -> libc::c_int; 2795 } 2796 extern "C" { sodium_mprotect_readonly(ptr: *mut libc::c_void) -> libc::c_int2797 pub fn sodium_mprotect_readonly(ptr: *mut libc::c_void) -> libc::c_int; 2798 } 2799 extern "C" { sodium_mprotect_readwrite(ptr: *mut libc::c_void) -> libc::c_int2800 pub fn sodium_mprotect_readwrite(ptr: *mut libc::c_void) -> libc::c_int; 2801 } 2802 extern "C" { sodium_pad( padded_buflen_p: *mut usize, buf: *mut libc::c_uchar, unpadded_buflen: usize, blocksize: usize, max_buflen: usize, ) -> libc::c_int2803 pub fn sodium_pad( 2804 padded_buflen_p: *mut usize, 2805 buf: *mut libc::c_uchar, 2806 unpadded_buflen: usize, 2807 blocksize: usize, 2808 max_buflen: usize, 2809 ) -> libc::c_int; 2810 } 2811 extern "C" { sodium_unpad( unpadded_buflen_p: *mut usize, buf: *const libc::c_uchar, padded_buflen: usize, blocksize: usize, ) -> libc::c_int2812 pub fn sodium_unpad( 2813 unpadded_buflen_p: *mut usize, 2814 buf: *const libc::c_uchar, 2815 padded_buflen: usize, 2816 blocksize: usize, 2817 ) -> libc::c_int; 2818 } 2819 extern "C" { crypto_stream_xchacha20_keybytes() -> usize2820 pub fn crypto_stream_xchacha20_keybytes() -> usize; 2821 } 2822 extern "C" { crypto_stream_xchacha20_noncebytes() -> usize2823 pub fn crypto_stream_xchacha20_noncebytes() -> usize; 2824 } 2825 extern "C" { crypto_stream_xchacha20_messagebytes_max() -> usize2826 pub fn crypto_stream_xchacha20_messagebytes_max() -> usize; 2827 } 2828 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_int2829 pub fn crypto_stream_xchacha20( 2830 c: *mut libc::c_uchar, 2831 clen: libc::c_ulonglong, 2832 n: *const libc::c_uchar, 2833 k: *const libc::c_uchar, 2834 ) -> libc::c_int; 2835 } 2836 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_int2837 pub fn crypto_stream_xchacha20_xor( 2838 c: *mut libc::c_uchar, 2839 m: *const libc::c_uchar, 2840 mlen: libc::c_ulonglong, 2841 n: *const libc::c_uchar, 2842 k: *const libc::c_uchar, 2843 ) -> libc::c_int; 2844 } 2845 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_int2846 pub fn crypto_stream_xchacha20_xor_ic( 2847 c: *mut libc::c_uchar, 2848 m: *const libc::c_uchar, 2849 mlen: libc::c_ulonglong, 2850 n: *const libc::c_uchar, 2851 ic: u64, 2852 k: *const libc::c_uchar, 2853 ) -> libc::c_int; 2854 } 2855 extern "C" { crypto_stream_xchacha20_keygen(k: *mut libc::c_uchar)2856 pub fn crypto_stream_xchacha20_keygen(k: *mut libc::c_uchar); 2857 } 2858 extern "C" { crypto_box_curve25519xchacha20poly1305_seedbytes() -> usize2859 pub fn crypto_box_curve25519xchacha20poly1305_seedbytes() -> usize; 2860 } 2861 extern "C" { crypto_box_curve25519xchacha20poly1305_publickeybytes() -> usize2862 pub fn crypto_box_curve25519xchacha20poly1305_publickeybytes() -> usize; 2863 } 2864 extern "C" { crypto_box_curve25519xchacha20poly1305_secretkeybytes() -> usize2865 pub fn crypto_box_curve25519xchacha20poly1305_secretkeybytes() -> usize; 2866 } 2867 extern "C" { crypto_box_curve25519xchacha20poly1305_beforenmbytes() -> usize2868 pub fn crypto_box_curve25519xchacha20poly1305_beforenmbytes() -> usize; 2869 } 2870 extern "C" { crypto_box_curve25519xchacha20poly1305_noncebytes() -> usize2871 pub fn crypto_box_curve25519xchacha20poly1305_noncebytes() -> usize; 2872 } 2873 extern "C" { crypto_box_curve25519xchacha20poly1305_macbytes() -> usize2874 pub fn crypto_box_curve25519xchacha20poly1305_macbytes() -> usize; 2875 } 2876 extern "C" { crypto_box_curve25519xchacha20poly1305_messagebytes_max() -> usize2877 pub fn crypto_box_curve25519xchacha20poly1305_messagebytes_max() -> usize; 2878 } 2879 extern "C" { crypto_box_curve25519xchacha20poly1305_seed_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, seed: *const libc::c_uchar, ) -> libc::c_int2880 pub fn crypto_box_curve25519xchacha20poly1305_seed_keypair( 2881 pk: *mut libc::c_uchar, 2882 sk: *mut libc::c_uchar, 2883 seed: *const libc::c_uchar, 2884 ) -> libc::c_int; 2885 } 2886 extern "C" { crypto_box_curve25519xchacha20poly1305_keypair( pk: *mut libc::c_uchar, sk: *mut libc::c_uchar, ) -> libc::c_int2887 pub fn crypto_box_curve25519xchacha20poly1305_keypair( 2888 pk: *mut libc::c_uchar, 2889 sk: *mut libc::c_uchar, 2890 ) -> libc::c_int; 2891 } 2892 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_int2893 pub fn crypto_box_curve25519xchacha20poly1305_easy( 2894 c: *mut libc::c_uchar, 2895 m: *const libc::c_uchar, 2896 mlen: libc::c_ulonglong, 2897 n: *const libc::c_uchar, 2898 pk: *const libc::c_uchar, 2899 sk: *const libc::c_uchar, 2900 ) -> libc::c_int; 2901 } 2902 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_int2903 pub fn crypto_box_curve25519xchacha20poly1305_open_easy( 2904 m: *mut libc::c_uchar, 2905 c: *const libc::c_uchar, 2906 clen: libc::c_ulonglong, 2907 n: *const libc::c_uchar, 2908 pk: *const libc::c_uchar, 2909 sk: *const libc::c_uchar, 2910 ) -> libc::c_int; 2911 } 2912 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_int2913 pub fn crypto_box_curve25519xchacha20poly1305_detached( 2914 c: *mut libc::c_uchar, 2915 mac: *mut libc::c_uchar, 2916 m: *const libc::c_uchar, 2917 mlen: libc::c_ulonglong, 2918 n: *const libc::c_uchar, 2919 pk: *const libc::c_uchar, 2920 sk: *const libc::c_uchar, 2921 ) -> libc::c_int; 2922 } 2923 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_int2924 pub fn crypto_box_curve25519xchacha20poly1305_open_detached( 2925 m: *mut libc::c_uchar, 2926 c: *const libc::c_uchar, 2927 mac: *const libc::c_uchar, 2928 clen: libc::c_ulonglong, 2929 n: *const libc::c_uchar, 2930 pk: *const libc::c_uchar, 2931 sk: *const libc::c_uchar, 2932 ) -> libc::c_int; 2933 } 2934 extern "C" { crypto_box_curve25519xchacha20poly1305_beforenm( k: *mut libc::c_uchar, pk: *const libc::c_uchar, sk: *const libc::c_uchar, ) -> libc::c_int2935 pub fn crypto_box_curve25519xchacha20poly1305_beforenm( 2936 k: *mut libc::c_uchar, 2937 pk: *const libc::c_uchar, 2938 sk: *const libc::c_uchar, 2939 ) -> libc::c_int; 2940 } 2941 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_int2942 pub fn crypto_box_curve25519xchacha20poly1305_easy_afternm( 2943 c: *mut libc::c_uchar, 2944 m: *const libc::c_uchar, 2945 mlen: libc::c_ulonglong, 2946 n: *const libc::c_uchar, 2947 k: *const libc::c_uchar, 2948 ) -> libc::c_int; 2949 } 2950 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_int2951 pub fn crypto_box_curve25519xchacha20poly1305_open_easy_afternm( 2952 m: *mut libc::c_uchar, 2953 c: *const libc::c_uchar, 2954 clen: libc::c_ulonglong, 2955 n: *const libc::c_uchar, 2956 k: *const libc::c_uchar, 2957 ) -> libc::c_int; 2958 } 2959 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_int2960 pub fn crypto_box_curve25519xchacha20poly1305_detached_afternm( 2961 c: *mut libc::c_uchar, 2962 mac: *mut libc::c_uchar, 2963 m: *const libc::c_uchar, 2964 mlen: libc::c_ulonglong, 2965 n: *const libc::c_uchar, 2966 k: *const libc::c_uchar, 2967 ) -> libc::c_int; 2968 } 2969 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_int2970 pub fn crypto_box_curve25519xchacha20poly1305_open_detached_afternm( 2971 m: *mut libc::c_uchar, 2972 c: *const libc::c_uchar, 2973 mac: *const libc::c_uchar, 2974 clen: libc::c_ulonglong, 2975 n: *const libc::c_uchar, 2976 k: *const libc::c_uchar, 2977 ) -> libc::c_int; 2978 } 2979 extern "C" { crypto_box_curve25519xchacha20poly1305_sealbytes() -> usize2980 pub fn crypto_box_curve25519xchacha20poly1305_sealbytes() -> usize; 2981 } 2982 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_int2983 pub fn crypto_box_curve25519xchacha20poly1305_seal( 2984 c: *mut libc::c_uchar, 2985 m: *const libc::c_uchar, 2986 mlen: libc::c_ulonglong, 2987 pk: *const libc::c_uchar, 2988 ) -> libc::c_int; 2989 } 2990 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_int2991 pub fn crypto_box_curve25519xchacha20poly1305_seal_open( 2992 m: *mut libc::c_uchar, 2993 c: *const libc::c_uchar, 2994 clen: libc::c_ulonglong, 2995 pk: *const libc::c_uchar, 2996 sk: *const libc::c_uchar, 2997 ) -> libc::c_int; 2998 } 2999 extern "C" { crypto_core_ed25519_bytes() -> usize3000 pub fn crypto_core_ed25519_bytes() -> usize; 3001 } 3002 extern "C" { crypto_core_ed25519_uniformbytes() -> usize3003 pub fn crypto_core_ed25519_uniformbytes() -> usize; 3004 } 3005 extern "C" { crypto_core_ed25519_hashbytes() -> usize3006 pub fn crypto_core_ed25519_hashbytes() -> usize; 3007 } 3008 extern "C" { crypto_core_ed25519_scalarbytes() -> usize3009 pub fn crypto_core_ed25519_scalarbytes() -> usize; 3010 } 3011 extern "C" { crypto_core_ed25519_nonreducedscalarbytes() -> usize3012 pub fn crypto_core_ed25519_nonreducedscalarbytes() -> usize; 3013 } 3014 extern "C" { crypto_core_ed25519_is_valid_point(p: *const libc::c_uchar) -> libc::c_int3015 pub fn crypto_core_ed25519_is_valid_point(p: *const libc::c_uchar) -> libc::c_int; 3016 } 3017 extern "C" { crypto_core_ed25519_add( r: *mut libc::c_uchar, p: *const libc::c_uchar, q: *const libc::c_uchar, ) -> libc::c_int3018 pub fn crypto_core_ed25519_add( 3019 r: *mut libc::c_uchar, 3020 p: *const libc::c_uchar, 3021 q: *const libc::c_uchar, 3022 ) -> libc::c_int; 3023 } 3024 extern "C" { crypto_core_ed25519_sub( r: *mut libc::c_uchar, p: *const libc::c_uchar, q: *const libc::c_uchar, ) -> libc::c_int3025 pub fn crypto_core_ed25519_sub( 3026 r: *mut libc::c_uchar, 3027 p: *const libc::c_uchar, 3028 q: *const libc::c_uchar, 3029 ) -> libc::c_int; 3030 } 3031 extern "C" { crypto_core_ed25519_from_uniform( p: *mut libc::c_uchar, r: *const libc::c_uchar, ) -> libc::c_int3032 pub fn crypto_core_ed25519_from_uniform( 3033 p: *mut libc::c_uchar, 3034 r: *const libc::c_uchar, 3035 ) -> libc::c_int; 3036 } 3037 extern "C" { crypto_core_ed25519_from_hash( p: *mut libc::c_uchar, h: *const libc::c_uchar, ) -> libc::c_int3038 pub fn crypto_core_ed25519_from_hash( 3039 p: *mut libc::c_uchar, 3040 h: *const libc::c_uchar, 3041 ) -> libc::c_int; 3042 } 3043 extern "C" { crypto_core_ed25519_random(p: *mut libc::c_uchar)3044 pub fn crypto_core_ed25519_random(p: *mut libc::c_uchar); 3045 } 3046 extern "C" { crypto_core_ed25519_scalar_random(r: *mut libc::c_uchar)3047 pub fn crypto_core_ed25519_scalar_random(r: *mut libc::c_uchar); 3048 } 3049 extern "C" { crypto_core_ed25519_scalar_invert( recip: *mut libc::c_uchar, s: *const libc::c_uchar, ) -> libc::c_int3050 pub fn crypto_core_ed25519_scalar_invert( 3051 recip: *mut libc::c_uchar, 3052 s: *const libc::c_uchar, 3053 ) -> libc::c_int; 3054 } 3055 extern "C" { crypto_core_ed25519_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar)3056 pub fn crypto_core_ed25519_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar); 3057 } 3058 extern "C" { crypto_core_ed25519_scalar_complement(comp: *mut libc::c_uchar, s: *const libc::c_uchar)3059 pub fn crypto_core_ed25519_scalar_complement(comp: *mut libc::c_uchar, s: *const libc::c_uchar); 3060 } 3061 extern "C" { crypto_core_ed25519_scalar_add( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3062 pub fn crypto_core_ed25519_scalar_add( 3063 z: *mut libc::c_uchar, 3064 x: *const libc::c_uchar, 3065 y: *const libc::c_uchar, 3066 ); 3067 } 3068 extern "C" { crypto_core_ed25519_scalar_sub( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3069 pub fn crypto_core_ed25519_scalar_sub( 3070 z: *mut libc::c_uchar, 3071 x: *const libc::c_uchar, 3072 y: *const libc::c_uchar, 3073 ); 3074 } 3075 extern "C" { crypto_core_ed25519_scalar_mul( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3076 pub fn crypto_core_ed25519_scalar_mul( 3077 z: *mut libc::c_uchar, 3078 x: *const libc::c_uchar, 3079 y: *const libc::c_uchar, 3080 ); 3081 } 3082 extern "C" { crypto_core_ed25519_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar)3083 pub fn crypto_core_ed25519_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar); 3084 } 3085 extern "C" { crypto_core_ristretto255_bytes() -> usize3086 pub fn crypto_core_ristretto255_bytes() -> usize; 3087 } 3088 extern "C" { crypto_core_ristretto255_hashbytes() -> usize3089 pub fn crypto_core_ristretto255_hashbytes() -> usize; 3090 } 3091 extern "C" { crypto_core_ristretto255_scalarbytes() -> usize3092 pub fn crypto_core_ristretto255_scalarbytes() -> usize; 3093 } 3094 extern "C" { crypto_core_ristretto255_nonreducedscalarbytes() -> usize3095 pub fn crypto_core_ristretto255_nonreducedscalarbytes() -> usize; 3096 } 3097 extern "C" { crypto_core_ristretto255_is_valid_point(p: *const libc::c_uchar) -> libc::c_int3098 pub fn crypto_core_ristretto255_is_valid_point(p: *const libc::c_uchar) -> libc::c_int; 3099 } 3100 extern "C" { crypto_core_ristretto255_add( r: *mut libc::c_uchar, p: *const libc::c_uchar, q: *const libc::c_uchar, ) -> libc::c_int3101 pub fn crypto_core_ristretto255_add( 3102 r: *mut libc::c_uchar, 3103 p: *const libc::c_uchar, 3104 q: *const libc::c_uchar, 3105 ) -> libc::c_int; 3106 } 3107 extern "C" { crypto_core_ristretto255_sub( r: *mut libc::c_uchar, p: *const libc::c_uchar, q: *const libc::c_uchar, ) -> libc::c_int3108 pub fn crypto_core_ristretto255_sub( 3109 r: *mut libc::c_uchar, 3110 p: *const libc::c_uchar, 3111 q: *const libc::c_uchar, 3112 ) -> libc::c_int; 3113 } 3114 extern "C" { crypto_core_ristretto255_from_hash( p: *mut libc::c_uchar, r: *const libc::c_uchar, ) -> libc::c_int3115 pub fn crypto_core_ristretto255_from_hash( 3116 p: *mut libc::c_uchar, 3117 r: *const libc::c_uchar, 3118 ) -> libc::c_int; 3119 } 3120 extern "C" { crypto_core_ristretto255_random(p: *mut libc::c_uchar)3121 pub fn crypto_core_ristretto255_random(p: *mut libc::c_uchar); 3122 } 3123 extern "C" { crypto_core_ristretto255_scalar_random(r: *mut libc::c_uchar)3124 pub fn crypto_core_ristretto255_scalar_random(r: *mut libc::c_uchar); 3125 } 3126 extern "C" { crypto_core_ristretto255_scalar_invert( recip: *mut libc::c_uchar, s: *const libc::c_uchar, ) -> libc::c_int3127 pub fn crypto_core_ristretto255_scalar_invert( 3128 recip: *mut libc::c_uchar, 3129 s: *const libc::c_uchar, 3130 ) -> libc::c_int; 3131 } 3132 extern "C" { crypto_core_ristretto255_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar)3133 pub fn crypto_core_ristretto255_scalar_negate(neg: *mut libc::c_uchar, s: *const libc::c_uchar); 3134 } 3135 extern "C" { crypto_core_ristretto255_scalar_complement( comp: *mut libc::c_uchar, s: *const libc::c_uchar, )3136 pub fn crypto_core_ristretto255_scalar_complement( 3137 comp: *mut libc::c_uchar, 3138 s: *const libc::c_uchar, 3139 ); 3140 } 3141 extern "C" { crypto_core_ristretto255_scalar_add( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3142 pub fn crypto_core_ristretto255_scalar_add( 3143 z: *mut libc::c_uchar, 3144 x: *const libc::c_uchar, 3145 y: *const libc::c_uchar, 3146 ); 3147 } 3148 extern "C" { crypto_core_ristretto255_scalar_sub( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3149 pub fn crypto_core_ristretto255_scalar_sub( 3150 z: *mut libc::c_uchar, 3151 x: *const libc::c_uchar, 3152 y: *const libc::c_uchar, 3153 ); 3154 } 3155 extern "C" { crypto_core_ristretto255_scalar_mul( z: *mut libc::c_uchar, x: *const libc::c_uchar, y: *const libc::c_uchar, )3156 pub fn crypto_core_ristretto255_scalar_mul( 3157 z: *mut libc::c_uchar, 3158 x: *const libc::c_uchar, 3159 y: *const libc::c_uchar, 3160 ); 3161 } 3162 extern "C" { crypto_core_ristretto255_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar)3163 pub fn crypto_core_ristretto255_scalar_reduce(r: *mut libc::c_uchar, s: *const libc::c_uchar); 3164 } 3165 extern "C" { crypto_scalarmult_ed25519_bytes() -> usize3166 pub fn crypto_scalarmult_ed25519_bytes() -> usize; 3167 } 3168 extern "C" { crypto_scalarmult_ed25519_scalarbytes() -> usize3169 pub fn crypto_scalarmult_ed25519_scalarbytes() -> usize; 3170 } 3171 extern "C" { crypto_scalarmult_ed25519( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int3172 pub fn crypto_scalarmult_ed25519( 3173 q: *mut libc::c_uchar, 3174 n: *const libc::c_uchar, 3175 p: *const libc::c_uchar, 3176 ) -> libc::c_int; 3177 } 3178 extern "C" { crypto_scalarmult_ed25519_noclamp( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int3179 pub fn crypto_scalarmult_ed25519_noclamp( 3180 q: *mut libc::c_uchar, 3181 n: *const libc::c_uchar, 3182 p: *const libc::c_uchar, 3183 ) -> libc::c_int; 3184 } 3185 extern "C" { crypto_scalarmult_ed25519_base( q: *mut libc::c_uchar, n: *const libc::c_uchar, ) -> libc::c_int3186 pub fn crypto_scalarmult_ed25519_base( 3187 q: *mut libc::c_uchar, 3188 n: *const libc::c_uchar, 3189 ) -> libc::c_int; 3190 } 3191 extern "C" { crypto_scalarmult_ed25519_base_noclamp( q: *mut libc::c_uchar, n: *const libc::c_uchar, ) -> libc::c_int3192 pub fn crypto_scalarmult_ed25519_base_noclamp( 3193 q: *mut libc::c_uchar, 3194 n: *const libc::c_uchar, 3195 ) -> libc::c_int; 3196 } 3197 extern "C" { crypto_scalarmult_ristretto255_bytes() -> usize3198 pub fn crypto_scalarmult_ristretto255_bytes() -> usize; 3199 } 3200 extern "C" { crypto_scalarmult_ristretto255_scalarbytes() -> usize3201 pub fn crypto_scalarmult_ristretto255_scalarbytes() -> usize; 3202 } 3203 extern "C" { crypto_scalarmult_ristretto255( q: *mut libc::c_uchar, n: *const libc::c_uchar, p: *const libc::c_uchar, ) -> libc::c_int3204 pub fn crypto_scalarmult_ristretto255( 3205 q: *mut libc::c_uchar, 3206 n: *const libc::c_uchar, 3207 p: *const libc::c_uchar, 3208 ) -> libc::c_int; 3209 } 3210 extern "C" { crypto_scalarmult_ristretto255_base( q: *mut libc::c_uchar, n: *const libc::c_uchar, ) -> libc::c_int3211 pub fn crypto_scalarmult_ristretto255_base( 3212 q: *mut libc::c_uchar, 3213 n: *const libc::c_uchar, 3214 ) -> libc::c_int; 3215 } 3216 extern "C" { crypto_secretbox_xchacha20poly1305_keybytes() -> usize3217 pub fn crypto_secretbox_xchacha20poly1305_keybytes() -> usize; 3218 } 3219 extern "C" { crypto_secretbox_xchacha20poly1305_noncebytes() -> usize3220 pub fn crypto_secretbox_xchacha20poly1305_noncebytes() -> usize; 3221 } 3222 extern "C" { crypto_secretbox_xchacha20poly1305_macbytes() -> usize3223 pub fn crypto_secretbox_xchacha20poly1305_macbytes() -> usize; 3224 } 3225 extern "C" { crypto_secretbox_xchacha20poly1305_messagebytes_max() -> usize3226 pub fn crypto_secretbox_xchacha20poly1305_messagebytes_max() -> usize; 3227 } 3228 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_int3229 pub fn crypto_secretbox_xchacha20poly1305_easy( 3230 c: *mut libc::c_uchar, 3231 m: *const libc::c_uchar, 3232 mlen: libc::c_ulonglong, 3233 n: *const libc::c_uchar, 3234 k: *const libc::c_uchar, 3235 ) -> libc::c_int; 3236 } 3237 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_int3238 pub fn crypto_secretbox_xchacha20poly1305_open_easy( 3239 m: *mut libc::c_uchar, 3240 c: *const libc::c_uchar, 3241 clen: libc::c_ulonglong, 3242 n: *const libc::c_uchar, 3243 k: *const libc::c_uchar, 3244 ) -> libc::c_int; 3245 } 3246 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_int3247 pub fn crypto_secretbox_xchacha20poly1305_detached( 3248 c: *mut libc::c_uchar, 3249 mac: *mut libc::c_uchar, 3250 m: *const libc::c_uchar, 3251 mlen: libc::c_ulonglong, 3252 n: *const libc::c_uchar, 3253 k: *const libc::c_uchar, 3254 ) -> libc::c_int; 3255 } 3256 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_int3257 pub fn crypto_secretbox_xchacha20poly1305_open_detached( 3258 m: *mut libc::c_uchar, 3259 c: *const libc::c_uchar, 3260 mac: *const libc::c_uchar, 3261 clen: libc::c_ulonglong, 3262 n: *const libc::c_uchar, 3263 k: *const libc::c_uchar, 3264 ) -> libc::c_int; 3265 } 3266 extern "C" { crypto_pwhash_scryptsalsa208sha256_bytes_min() -> usize3267 pub fn crypto_pwhash_scryptsalsa208sha256_bytes_min() -> usize; 3268 } 3269 extern "C" { crypto_pwhash_scryptsalsa208sha256_bytes_max() -> usize3270 pub fn crypto_pwhash_scryptsalsa208sha256_bytes_max() -> usize; 3271 } 3272 extern "C" { crypto_pwhash_scryptsalsa208sha256_passwd_min() -> usize3273 pub fn crypto_pwhash_scryptsalsa208sha256_passwd_min() -> usize; 3274 } 3275 extern "C" { crypto_pwhash_scryptsalsa208sha256_passwd_max() -> usize3276 pub fn crypto_pwhash_scryptsalsa208sha256_passwd_max() -> usize; 3277 } 3278 extern "C" { crypto_pwhash_scryptsalsa208sha256_saltbytes() -> usize3279 pub fn crypto_pwhash_scryptsalsa208sha256_saltbytes() -> usize; 3280 } 3281 extern "C" { crypto_pwhash_scryptsalsa208sha256_strbytes() -> usize3282 pub fn crypto_pwhash_scryptsalsa208sha256_strbytes() -> usize; 3283 } 3284 extern "C" { crypto_pwhash_scryptsalsa208sha256_strprefix() -> *const libc::c_char3285 pub fn crypto_pwhash_scryptsalsa208sha256_strprefix() -> *const libc::c_char; 3286 } 3287 extern "C" { crypto_pwhash_scryptsalsa208sha256_opslimit_min() -> usize3288 pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_min() -> usize; 3289 } 3290 extern "C" { crypto_pwhash_scryptsalsa208sha256_opslimit_max() -> usize3291 pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_max() -> usize; 3292 } 3293 extern "C" { crypto_pwhash_scryptsalsa208sha256_memlimit_min() -> usize3294 pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_min() -> usize; 3295 } 3296 extern "C" { crypto_pwhash_scryptsalsa208sha256_memlimit_max() -> usize3297 pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_max() -> usize; 3298 } 3299 extern "C" { crypto_pwhash_scryptsalsa208sha256_opslimit_interactive() -> usize3300 pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_interactive() -> usize; 3301 } 3302 extern "C" { crypto_pwhash_scryptsalsa208sha256_memlimit_interactive() -> usize3303 pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_interactive() -> usize; 3304 } 3305 extern "C" { crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive() -> usize3306 pub fn crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive() -> usize; 3307 } 3308 extern "C" { crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive() -> usize3309 pub fn crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive() -> usize; 3310 } 3311 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_int3312 pub fn crypto_pwhash_scryptsalsa208sha256( 3313 out: *mut libc::c_uchar, 3314 outlen: libc::c_ulonglong, 3315 passwd: *const libc::c_char, 3316 passwdlen: libc::c_ulonglong, 3317 salt: *const libc::c_uchar, 3318 opslimit: libc::c_ulonglong, 3319 memlimit: usize, 3320 ) -> libc::c_int; 3321 } 3322 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_int3323 pub fn crypto_pwhash_scryptsalsa208sha256_str( 3324 out: *mut libc::c_char, 3325 passwd: *const libc::c_char, 3326 passwdlen: libc::c_ulonglong, 3327 opslimit: libc::c_ulonglong, 3328 memlimit: usize, 3329 ) -> libc::c_int; 3330 } 3331 extern "C" { crypto_pwhash_scryptsalsa208sha256_str_verify( str: *const libc::c_char, passwd: *const libc::c_char, passwdlen: libc::c_ulonglong, ) -> libc::c_int3332 pub fn crypto_pwhash_scryptsalsa208sha256_str_verify( 3333 str: *const libc::c_char, 3334 passwd: *const libc::c_char, 3335 passwdlen: libc::c_ulonglong, 3336 ) -> libc::c_int; 3337 } 3338 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_int3339 pub fn crypto_pwhash_scryptsalsa208sha256_ll( 3340 passwd: *const u8, 3341 passwdlen: usize, 3342 salt: *const u8, 3343 saltlen: usize, 3344 N: u64, 3345 r: u32, 3346 p: u32, 3347 buf: *mut u8, 3348 buflen: usize, 3349 ) -> libc::c_int; 3350 } 3351 extern "C" { crypto_pwhash_scryptsalsa208sha256_str_needs_rehash( str: *const libc::c_char, opslimit: libc::c_ulonglong, memlimit: usize, ) -> libc::c_int3352 pub fn crypto_pwhash_scryptsalsa208sha256_str_needs_rehash( 3353 str: *const libc::c_char, 3354 opslimit: libc::c_ulonglong, 3355 memlimit: usize, 3356 ) -> libc::c_int; 3357 } 3358 extern "C" { crypto_stream_salsa2012_keybytes() -> usize3359 pub fn crypto_stream_salsa2012_keybytes() -> usize; 3360 } 3361 extern "C" { crypto_stream_salsa2012_noncebytes() -> usize3362 pub fn crypto_stream_salsa2012_noncebytes() -> usize; 3363 } 3364 extern "C" { crypto_stream_salsa2012_messagebytes_max() -> usize3365 pub fn crypto_stream_salsa2012_messagebytes_max() -> usize; 3366 } 3367 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_int3368 pub fn crypto_stream_salsa2012( 3369 c: *mut libc::c_uchar, 3370 clen: libc::c_ulonglong, 3371 n: *const libc::c_uchar, 3372 k: *const libc::c_uchar, 3373 ) -> libc::c_int; 3374 } 3375 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_int3376 pub fn crypto_stream_salsa2012_xor( 3377 c: *mut libc::c_uchar, 3378 m: *const libc::c_uchar, 3379 mlen: libc::c_ulonglong, 3380 n: *const libc::c_uchar, 3381 k: *const libc::c_uchar, 3382 ) -> libc::c_int; 3383 } 3384 extern "C" { crypto_stream_salsa2012_keygen(k: *mut libc::c_uchar)3385 pub fn crypto_stream_salsa2012_keygen(k: *mut libc::c_uchar); 3386 } 3387 extern "C" { crypto_stream_salsa208_keybytes() -> usize3388 pub fn crypto_stream_salsa208_keybytes() -> usize; 3389 } 3390 extern "C" { crypto_stream_salsa208_noncebytes() -> usize3391 pub fn crypto_stream_salsa208_noncebytes() -> usize; 3392 } 3393 extern "C" { crypto_stream_salsa208_messagebytes_max() -> usize3394 pub fn crypto_stream_salsa208_messagebytes_max() -> usize; 3395 } 3396 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_int3397 pub fn crypto_stream_salsa208( 3398 c: *mut libc::c_uchar, 3399 clen: libc::c_ulonglong, 3400 n: *const libc::c_uchar, 3401 k: *const libc::c_uchar, 3402 ) -> libc::c_int; 3403 } 3404 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_int3405 pub fn crypto_stream_salsa208_xor( 3406 c: *mut libc::c_uchar, 3407 m: *const libc::c_uchar, 3408 mlen: libc::c_ulonglong, 3409 n: *const libc::c_uchar, 3410 k: *const libc::c_uchar, 3411 ) -> libc::c_int; 3412 } 3413 extern "C" { crypto_stream_salsa208_keygen(k: *mut libc::c_uchar)3414 pub fn crypto_stream_salsa208_keygen(k: *mut libc::c_uchar); 3415 } 3416