/* automatically generated by rust-bindgen 0.59.1 */ pub const USE_PRECOMPUTED_CP: u32 = 1; pub const USE_INVERSE_FAST: u32 = 1; pub const USE_BN_PRINT: u32 = 0; pub const USE_RFC6979: u32 = 1; pub const USE_BIP32_CACHE: u32 = 1; pub const BIP32_CACHE_SIZE: u32 = 10; pub const BIP32_CACHE_MAXDEPTH: u32 = 8; pub const USE_BIP32_25519_CURVES: u32 = 1; pub const USE_BIP39_CACHE: u32 = 1; pub const BIP39_CACHE_SIZE: u32 = 4; pub const _FEATURES_H: u32 = 1; pub const _DEFAULT_SOURCE: u32 = 1; pub const __GLIBC_USE_ISOC2X: u32 = 0; pub const __USE_ISOC99: u32 = 1; pub const __USE_ISOC95: u32 = 1; pub const __USE_POSIX_IMPLICITLY: u32 = 1; pub const _POSIX_SOURCE: u32 = 1; pub const _POSIX_C_SOURCE: u32 = 200809; pub const __USE_POSIX: u32 = 1; pub const __USE_POSIX2: u32 = 1; pub const __USE_POSIX199309: u32 = 1; pub const __USE_POSIX199506: u32 = 1; pub const __USE_XOPEN2K: u32 = 1; pub const __USE_XOPEN2K8: u32 = 1; pub const _ATFILE_SOURCE: u32 = 1; pub const __USE_MISC: u32 = 1; pub const __USE_ATFILE: u32 = 1; pub const __USE_FORTIFY_LEVEL: u32 = 0; pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 1; pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; pub const _STDC_PREDEF_H: u32 = 1; pub const __STDC_IEC_559__: u32 = 1; pub const __STDC_IEC_559_COMPLEX__: u32 = 1; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; pub const __GLIBC_MINOR__: u32 = 31; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; pub const __WORDSIZE: u32 = 64; pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; pub const __SYSCALL_WORDSIZE: u32 = 64; pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0; pub const __HAVE_GENERIC_SELECTION: u32 = 1; pub const __GLIBC_USE_LIB_EXT2: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; pub const _STDLIB_H: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; pub const WEXITED: u32 = 4; pub const WCONTINUED: u32 = 8; pub const WNOWAIT: u32 = 16777216; pub const __WNOTHREAD: u32 = 536870912; pub const __WALL: u32 = 1073741824; pub const __WCLONE: u32 = 2147483648; pub const __ENUM_IDTYPE_T: u32 = 1; pub const __W_CONTINUED: u32 = 65535; pub const __WCOREFLAG: u32 = 128; pub const __HAVE_FLOAT128: u32 = 0; pub const __HAVE_DISTINCT_FLOAT128: u32 = 0; pub const __HAVE_FLOAT64X: u32 = 1; pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1; pub const __HAVE_FLOAT16: u32 = 0; pub const __HAVE_FLOAT32: u32 = 1; pub const __HAVE_FLOAT64: u32 = 1; pub const __HAVE_FLOAT32X: u32 = 1; pub const __HAVE_FLOAT128X: u32 = 0; pub const __HAVE_DISTINCT_FLOAT16: u32 = 0; pub const __HAVE_DISTINCT_FLOAT32: u32 = 0; pub const __HAVE_DISTINCT_FLOAT64: u32 = 0; pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0; pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0; pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0; pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0; pub const __ldiv_t_defined: u32 = 1; pub const __lldiv_t_defined: u32 = 1; pub const RAND_MAX: u32 = 2147483647; pub const EXIT_FAILURE: u32 = 1; pub const EXIT_SUCCESS: u32 = 0; pub const _SYS_TYPES_H: u32 = 1; pub const _BITS_TYPES_H: u32 = 1; pub const __TIMESIZE: u32 = 64; pub const _BITS_TYPESIZES_H: u32 = 1; pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; pub const __INO_T_MATCHES_INO64_T: u32 = 1; pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; pub const __STATFS_MATCHES_STATFS64: u32 = 1; pub const __FD_SETSIZE: u32 = 1024; pub const _BITS_TIME64_H: u32 = 1; pub const __clock_t_defined: u32 = 1; pub const __clockid_t_defined: u32 = 1; pub const __time_t_defined: u32 = 1; pub const __timer_t_defined: u32 = 1; pub const _BITS_STDINT_INTN_H: u32 = 1; pub const __BIT_TYPES_DEFINED__: u32 = 1; pub const _ENDIAN_H: u32 = 1; pub const _BITS_ENDIAN_H: u32 = 1; pub const __LITTLE_ENDIAN: u32 = 1234; pub const __BIG_ENDIAN: u32 = 4321; pub const __PDP_ENDIAN: u32 = 3412; pub const _BITS_ENDIANNESS_H: u32 = 1; pub const __BYTE_ORDER: u32 = 1234; pub const __FLOAT_WORD_ORDER: u32 = 1234; pub const LITTLE_ENDIAN: u32 = 1234; pub const BIG_ENDIAN: u32 = 4321; pub const PDP_ENDIAN: u32 = 3412; pub const BYTE_ORDER: u32 = 1234; pub const _BITS_BYTESWAP_H: u32 = 1; pub const _BITS_UINTN_IDENTITY_H: u32 = 1; pub const _SYS_SELECT_H: u32 = 1; pub const __FD_ZERO_STOS: &'static [u8; 6usize] = b"stosq\0"; pub const __sigset_t_defined: u32 = 1; pub const __timeval_defined: u32 = 1; pub const _STRUCT_TIMESPEC: u32 = 1; pub const FD_SETSIZE: u32 = 1024; pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; pub const _THREAD_SHARED_TYPES_H: u32 = 1; pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1; pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; pub const __have_pthread_attr_t: u32 = 1; pub const _ALLOCA_H: u32 = 1; pub const _STDINT_H: u32 = 1; pub const _BITS_WCHAR_H: u32 = 1; pub const _BITS_STDINT_UINTN_H: u32 = 1; pub const INT8_MIN: i32 = -128; pub const INT16_MIN: i32 = -32768; pub const INT32_MIN: i32 = -2147483648; pub const INT8_MAX: u32 = 127; pub const INT16_MAX: u32 = 32767; pub const INT32_MAX: u32 = 2147483647; pub const UINT8_MAX: u32 = 255; pub const UINT16_MAX: u32 = 65535; pub const UINT32_MAX: u32 = 4294967295; pub const INT_LEAST8_MIN: i32 = -128; pub const INT_LEAST16_MIN: i32 = -32768; pub const INT_LEAST32_MIN: i32 = -2147483648; pub const INT_LEAST8_MAX: u32 = 127; pub const INT_LEAST16_MAX: u32 = 32767; pub const INT_LEAST32_MAX: u32 = 2147483647; pub const UINT_LEAST8_MAX: u32 = 255; pub const UINT_LEAST16_MAX: u32 = 65535; pub const UINT_LEAST32_MAX: u32 = 4294967295; pub const INT_FAST8_MIN: i32 = -128; pub const INT_FAST16_MIN: i64 = -9223372036854775808; pub const INT_FAST32_MIN: i64 = -9223372036854775808; pub const INT_FAST8_MAX: u32 = 127; pub const INT_FAST16_MAX: u64 = 9223372036854775807; pub const INT_FAST32_MAX: u64 = 9223372036854775807; pub const UINT_FAST8_MAX: u32 = 255; pub const UINT_FAST16_MAX: i32 = -1; pub const UINT_FAST32_MAX: i32 = -1; pub const INTPTR_MIN: i64 = -9223372036854775808; pub const INTPTR_MAX: u64 = 9223372036854775807; pub const UINTPTR_MAX: i32 = -1; pub const PTRDIFF_MIN: i64 = -9223372036854775808; pub const PTRDIFF_MAX: u64 = 9223372036854775807; pub const SIG_ATOMIC_MIN: i32 = -2147483648; pub const SIG_ATOMIC_MAX: u32 = 2147483647; pub const SIZE_MAX: i32 = -1; pub const WINT_MIN: u32 = 0; pub const WINT_MAX: u32 = 4294967295; pub const AES_BLOCK_SIZE_P2: u32 = 4; pub const AES_BLOCK_SIZE: u32 = 16; pub const N_COLS: u32 = 4; pub const KS_LENGTH: u32 = 60; pub const IS_BIG_ENDIAN: u32 = 4321; pub const IS_LITTLE_ENDIAN: u32 = 1234; pub const PLATFORM_BYTE_ORDER: u32 = 1234; pub const ENCRYPTION_IN_C: u32 = 1; pub const DECRYPTION_IN_C: u32 = 2; pub const ENC_KEYING_IN_C: u32 = 4; pub const DEC_KEYING_IN_C: u32 = 8; pub const NO_TABLES: u32 = 0; pub const ONE_TABLE: u32 = 1; pub const FOUR_TABLES: u32 = 4; pub const NONE: u32 = 0; pub const PARTIAL: u32 = 1; pub const FULL: u32 = 2; pub const ALGORITHM_BYTE_ORDER: u32 = 1234; pub const ENC_UNROLL: u32 = 2; pub const DEC_UNROLL: u32 = 2; pub const ENC_ROUND: u32 = 4; pub const LAST_ENC_ROUND: u32 = 4; pub const DEC_ROUND: u32 = 4; pub const LAST_DEC_ROUND: u32 = 4; pub const KEY_SCHED: u32 = 4; pub const EFUNCS_IN_C: u32 = 5; pub const DFUNCS_IN_C: u32 = 10; pub const FUNCS_IN_C: u32 = 15; pub const RC_LENGTH: u32 = 10; pub const WPOLY: u32 = 283; pub const BPOLY: u32 = 27; pub const gf_c1: u32 = 2155905152; pub const gf_c2: u32 = 2139062143; pub const _STRING_H: u32 = 1; pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; pub const _STRINGS_H: u32 = 1; pub const bignum256modm_bits_per_limb: u32 = 30; pub const bignum256modm_limb_size: u32 = 9; pub const sha3_224_hash_size: u32 = 28; pub const sha3_256_hash_size: u32 = 32; pub const sha3_384_hash_size: u32 = 48; pub const sha3_512_hash_size: u32 = 64; pub const sha3_max_permutation_size: u32 = 25; pub const sha3_max_rate_in_qwords: u32 = 24; pub const SHA3_224_BLOCK_LENGTH: u32 = 144; pub const SHA3_256_BLOCK_LENGTH: u32 = 136; pub const SHA3_384_BLOCK_LENGTH: u32 = 104; pub const SHA3_512_BLOCK_LENGTH: u32 = 72; pub const SHA3_224_DIGEST_LENGTH: u32 = 28; pub const SHA3_256_DIGEST_LENGTH: u32 = 32; pub const SHA3_384_DIGEST_LENGTH: u32 = 48; pub const SHA3_512_DIGEST_LENGTH: u32 = 64; pub const true_: u32 = 1; pub const false_: u32 = 0; pub const __bool_true_false_are_defined: u32 = 1; pub const BN_LIMBS: u32 = 9; pub const BN_BITS_PER_LIMB: u32 = 29; pub const BN_BASE: u32 = 536870912; pub const BN_LIMB_MASK: u32 = 536870911; pub const BN_EXTRA_BITS: u32 = 3; pub const BN_BITS_LAST_LIMB: u32 = 24; pub const BLAKE256_DIGEST_LENGTH: u32 = 32; pub const BLAKE256_BLOCK_LENGTH: u32 = 64; pub const SHA1_BLOCK_LENGTH: u32 = 64; pub const SHA1_DIGEST_LENGTH: u32 = 20; pub const SHA1_DIGEST_STRING_LENGTH: u32 = 41; pub const SHA256_BLOCK_LENGTH: u32 = 64; pub const SHA256_DIGEST_LENGTH: u32 = 32; pub const SHA256_DIGEST_STRING_LENGTH: u32 = 65; pub const SHA512_BLOCK_LENGTH: u32 = 128; pub const SHA512_DIGEST_LENGTH: u32 = 64; pub const SHA512_DIGEST_STRING_LENGTH: u32 = 129; pub const HASHER_DIGEST_LENGTH: u32 = 32; pub const MAX_ADDR_RAW_SIZE: u32 = 65; pub const MAX_ADDR_SIZE: u32 = 130; pub const MAX_WIF_RAW_SIZE: u32 = 37; pub const MAX_WIF_SIZE: u32 = 57; pub const XPUB_MAXLEN: u32 = 112; pub const ADDRESS_MAXLEN: u32 = 39; pub const BIP39_WORDS: u32 = 2048; pub const BIP39_PBKDF2_ROUNDS: u32 = 2048; pub const RIPEMD160_BLOCK_LENGTH: u32 = 64; pub const RIPEMD160_DIGEST_LENGTH: u32 = 20; pub const XMR_ATOMS: u32 = 64; pub const ECRYPT_VARIANT: u32 = 1; pub const _LIBC_LIMITS_H_: u32 = 1; pub const MB_LEN_MAX: u32 = 16; pub const _BITS_POSIX1_LIM_H: u32 = 1; pub const _POSIX_AIO_LISTIO_MAX: u32 = 2; pub const _POSIX_AIO_MAX: u32 = 1; pub const _POSIX_ARG_MAX: u32 = 4096; pub const _POSIX_CHILD_MAX: u32 = 25; pub const _POSIX_DELAYTIMER_MAX: u32 = 32; pub const _POSIX_HOST_NAME_MAX: u32 = 255; pub const _POSIX_LINK_MAX: u32 = 8; pub const _POSIX_LOGIN_NAME_MAX: u32 = 9; pub const _POSIX_MAX_CANON: u32 = 255; pub const _POSIX_MAX_INPUT: u32 = 255; pub const _POSIX_MQ_OPEN_MAX: u32 = 8; pub const _POSIX_MQ_PRIO_MAX: u32 = 32; pub const _POSIX_NAME_MAX: u32 = 14; pub const _POSIX_NGROUPS_MAX: u32 = 8; pub const _POSIX_OPEN_MAX: u32 = 20; pub const _POSIX_PATH_MAX: u32 = 256; pub const _POSIX_PIPE_BUF: u32 = 512; pub const _POSIX_RE_DUP_MAX: u32 = 255; pub const _POSIX_RTSIG_MAX: u32 = 8; pub const _POSIX_SEM_NSEMS_MAX: u32 = 256; pub const _POSIX_SEM_VALUE_MAX: u32 = 32767; pub const _POSIX_SIGQUEUE_MAX: u32 = 32; pub const _POSIX_SSIZE_MAX: u32 = 32767; pub const _POSIX_STREAM_MAX: u32 = 8; pub const _POSIX_SYMLINK_MAX: u32 = 255; pub const _POSIX_SYMLOOP_MAX: u32 = 8; pub const _POSIX_TIMER_MAX: u32 = 32; pub const _POSIX_TTY_NAME_MAX: u32 = 9; pub const _POSIX_TZNAME_MAX: u32 = 6; pub const _POSIX_CLOCKRES_MIN: u32 = 20000000; pub const NR_OPEN: u32 = 1024; pub const NGROUPS_MAX: u32 = 65536; pub const ARG_MAX: u32 = 131072; pub const LINK_MAX: u32 = 127; pub const MAX_CANON: u32 = 255; pub const MAX_INPUT: u32 = 255; pub const NAME_MAX: u32 = 255; pub const PATH_MAX: u32 = 4096; pub const PIPE_BUF: u32 = 4096; pub const XATTR_NAME_MAX: u32 = 255; pub const XATTR_SIZE_MAX: u32 = 65536; pub const XATTR_LIST_MAX: u32 = 65536; pub const RTSIG_MAX: u32 = 32; pub const _POSIX_THREAD_KEYS_MAX: u32 = 128; pub const PTHREAD_KEYS_MAX: u32 = 1024; pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4; pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4; pub const _POSIX_THREAD_THREADS_MAX: u32 = 64; pub const AIO_PRIO_DELTA_MAX: u32 = 20; pub const PTHREAD_STACK_MIN: u32 = 16384; pub const DELAYTIMER_MAX: u32 = 2147483647; pub const TTY_NAME_MAX: u32 = 32; pub const LOGIN_NAME_MAX: u32 = 256; pub const HOST_NAME_MAX: u32 = 64; pub const MQ_PRIO_MAX: u32 = 32768; pub const SEM_VALUE_MAX: u32 = 2147483647; pub const _BITS_POSIX2_LIM_H: u32 = 1; pub const _POSIX2_BC_BASE_MAX: u32 = 99; pub const _POSIX2_BC_DIM_MAX: u32 = 2048; pub const _POSIX2_BC_SCALE_MAX: u32 = 99; pub const _POSIX2_BC_STRING_MAX: u32 = 1000; pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2; pub const _POSIX2_EXPR_NEST_MAX: u32 = 32; pub const _POSIX2_LINE_MAX: u32 = 2048; pub const _POSIX2_RE_DUP_MAX: u32 = 255; pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14; pub const BC_BASE_MAX: u32 = 99; pub const BC_DIM_MAX: u32 = 2048; pub const BC_SCALE_MAX: u32 = 99; pub const BC_STRING_MAX: u32 = 1000; pub const COLL_WEIGHTS_MAX: u32 = 255; pub const EXPR_NEST_MAX: u32 = 32; pub const LINE_MAX: u32 = 2048; pub const CHARCLASS_NAME_MAX: u32 = 2048; pub const RE_DUP_MAX: u32 = 32767; pub const _MM_HINT_ET0: u32 = 7; pub const _MM_HINT_ET1: u32 = 6; pub const _MM_HINT_T0: u32 = 3; pub const _MM_HINT_T1: u32 = 2; pub const _MM_HINT_T2: u32 = 1; pub const _MM_HINT_NTA: u32 = 0; pub const _MM_EXCEPT_INVALID: u32 = 1; pub const _MM_EXCEPT_DENORM: u32 = 2; pub const _MM_EXCEPT_DIV_ZERO: u32 = 4; pub const _MM_EXCEPT_OVERFLOW: u32 = 8; pub const _MM_EXCEPT_UNDERFLOW: u32 = 16; pub const _MM_EXCEPT_INEXACT: u32 = 32; pub const _MM_EXCEPT_MASK: u32 = 63; pub const _MM_MASK_INVALID: u32 = 128; pub const _MM_MASK_DENORM: u32 = 256; pub const _MM_MASK_DIV_ZERO: u32 = 512; pub const _MM_MASK_OVERFLOW: u32 = 1024; pub const _MM_MASK_UNDERFLOW: u32 = 2048; pub const _MM_MASK_INEXACT: u32 = 4096; pub const _MM_MASK_MASK: u32 = 8064; pub const _MM_ROUND_NEAREST: u32 = 0; pub const _MM_ROUND_DOWN: u32 = 8192; pub const _MM_ROUND_UP: u32 = 16384; pub const _MM_ROUND_TOWARD_ZERO: u32 = 24576; pub const _MM_ROUND_MASK: u32 = 24576; pub const _MM_FLUSH_ZERO_MASK: u32 = 32768; pub const _MM_FLUSH_ZERO_ON: u32 = 32768; pub const _MM_FLUSH_ZERO_OFF: u32 = 0; pub const _MM_DENORMALS_ZERO_ON: u32 = 64; pub const _MM_DENORMALS_ZERO_OFF: u32 = 0; pub const _MM_DENORMALS_ZERO_MASK: u32 = 64; pub const ECRYPT_NAME: &'static [u8; 9usize] = b"ChaCha20\0"; pub const ECRYPT_PROFILE: &'static [u8; 6usize] = b"_____\0"; pub const ECRYPT_MAXKEYSIZE: u32 = 256; pub const ECRYPT_MAXIVSIZE: u32 = 64; pub const ECRYPT_BLOCKLENGTH: u32 = 64; pub const ECRYPT_MAXVARIANT: u32 = 1; pub const NEM_LEVY_PERCENTILE_DIVISOR: u32 = 4; pub const NEM_MAX_DIVISIBILITY: u32 = 6; pub const NEM_MAX_SUPPLY: u64 = 9000000000; pub const NEM_NETWORK_MAINNET: u32 = 104; pub const NEM_NETWORK_TESTNET: u32 = 152; pub const NEM_NETWORK_MIJIN: u32 = 96; pub const NEM_ADDRESS_SIZE: u32 = 40; pub const NEM_ADDRESS_SIZE_RAW: u32 = 25; pub const NEM_TRANSACTION_TYPE_TRANSFER: u32 = 257; pub const NEM_TRANSACTION_TYPE_IMPORTANCE_TRANSFER: u32 = 2049; pub const NEM_TRANSACTION_TYPE_AGGREGATE_MODIFICATION: u32 = 4097; pub const NEM_TRANSACTION_TYPE_MULTISIG_SIGNATURE: u32 = 4098; pub const NEM_TRANSACTION_TYPE_MULTISIG: u32 = 4100; pub const NEM_TRANSACTION_TYPE_PROVISION_NAMESPACE: u32 = 8193; pub const NEM_TRANSACTION_TYPE_MOSAIC_CREATION: u32 = 16385; pub const NEM_TRANSACTION_TYPE_MOSAIC_SUPPLY_CHANGE: u32 = 16386; pub const _SEGWIT_ADDR_H_: u32 = 1; pub const _CASH_ADDR_H_: u32 = 1; pub const SHAMIR_MAX_LEN: u32 = 32; pub const SCHNORR_SIG_LENGTH: u32 = 64; pub type size_t = ::std::os::raw::c_ulong; pub type wchar_t = ::std::os::raw::c_int; pub const idtype_t_P_ALL: idtype_t = 0; pub const idtype_t_P_PID: idtype_t = 1; pub const idtype_t_P_PGID: idtype_t = 2; pub type idtype_t = ::std::os::raw::c_uint; pub type _Float32 = f32; pub type _Float64 = f64; pub type _Float32x = f64; pub type _Float64x = u128; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct div_t { pub quot: ::std::os::raw::c_int, pub rem: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_div_t() { assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(div_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(div_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(div_t), "::", stringify!(quot) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(div_t), "::", stringify!(rem) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ldiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } #[test] fn bindgen_test_layout_ldiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(ldiv_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ldiv_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(ldiv_t), "::", stringify!(quot) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(ldiv_t), "::", stringify!(rem) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct lldiv_t { pub quot: ::std::os::raw::c_longlong, pub rem: ::std::os::raw::c_longlong, } #[test] fn bindgen_test_layout_lldiv_t() { assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(lldiv_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(lldiv_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(lldiv_t), "::", stringify!(quot) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(lldiv_t), "::", stringify!(rem) ) ); } extern "C" { pub fn __ctype_get_mb_cur_max() -> size_t; } extern "C" { pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64; } extern "C" { pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; } extern "C" { pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; } extern "C" { pub fn strtod( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, ) -> f64; } extern "C" { pub fn strtof( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, ) -> f32; } extern "C" { pub fn strtold( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, ) -> u128; } extern "C" { pub fn strtol( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_long; } extern "C" { pub fn strtoul( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_ulong; } extern "C" { pub fn strtoq( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_longlong; } extern "C" { pub fn strtouq( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_ulonglong; } extern "C" { pub fn strtoll( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_longlong; } extern "C" { pub fn strtoull( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_ulonglong; } extern "C" { pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; } pub type __u_char = ::std::os::raw::c_uchar; pub type __u_short = ::std::os::raw::c_ushort; pub type __u_int = ::std::os::raw::c_uint; pub type __u_long = ::std::os::raw::c_ulong; pub type __int8_t = ::std::os::raw::c_schar; pub type __uint8_t = ::std::os::raw::c_uchar; pub type __int16_t = ::std::os::raw::c_short; pub type __uint16_t = ::std::os::raw::c_ushort; pub type __int32_t = ::std::os::raw::c_int; pub type __uint32_t = ::std::os::raw::c_uint; pub type __int64_t = ::std::os::raw::c_long; pub type __uint64_t = ::std::os::raw::c_ulong; pub type __int_least8_t = __int8_t; pub type __uint_least8_t = __uint8_t; pub type __int_least16_t = __int16_t; pub type __uint_least16_t = __uint16_t; pub type __int_least32_t = __int32_t; pub type __uint_least32_t = __uint32_t; pub type __int_least64_t = __int64_t; pub type __uint_least64_t = __uint64_t; pub type __quad_t = ::std::os::raw::c_long; pub type __u_quad_t = ::std::os::raw::c_ulong; pub type __intmax_t = ::std::os::raw::c_long; pub type __uintmax_t = ::std::os::raw::c_ulong; pub type __dev_t = ::std::os::raw::c_ulong; pub type __uid_t = ::std::os::raw::c_uint; pub type __gid_t = ::std::os::raw::c_uint; pub type __ino_t = ::std::os::raw::c_ulong; pub type __ino64_t = ::std::os::raw::c_ulong; pub type __mode_t = ::std::os::raw::c_uint; pub type __nlink_t = ::std::os::raw::c_ulong; pub type __off_t = ::std::os::raw::c_long; pub type __off64_t = ::std::os::raw::c_long; pub type __pid_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __fsid_t { pub __val: [::std::os::raw::c_int; 2usize], } #[test] fn bindgen_test_layout___fsid_t() { assert_eq!( ::std::mem::size_of::<__fsid_t>(), 8usize, concat!("Size of: ", stringify!(__fsid_t)) ); assert_eq!( ::std::mem::align_of::<__fsid_t>(), 4usize, concat!("Alignment of ", stringify!(__fsid_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__fsid_t), "::", stringify!(__val) ) ); } pub type __clock_t = ::std::os::raw::c_long; pub type __rlim_t = ::std::os::raw::c_ulong; pub type __rlim64_t = ::std::os::raw::c_ulong; pub type __id_t = ::std::os::raw::c_uint; pub type __time_t = ::std::os::raw::c_long; pub type __useconds_t = ::std::os::raw::c_uint; pub type __suseconds_t = ::std::os::raw::c_long; pub type __daddr_t = ::std::os::raw::c_int; pub type __key_t = ::std::os::raw::c_int; pub type __clockid_t = ::std::os::raw::c_int; pub type __timer_t = *mut ::std::os::raw::c_void; pub type __blksize_t = ::std::os::raw::c_long; pub type __blkcnt_t = ::std::os::raw::c_long; pub type __blkcnt64_t = ::std::os::raw::c_long; pub type __fsblkcnt_t = ::std::os::raw::c_ulong; pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; pub type __fsfilcnt_t = ::std::os::raw::c_ulong; pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; pub type __fsword_t = ::std::os::raw::c_long; pub type __ssize_t = ::std::os::raw::c_long; pub type __syscall_slong_t = ::std::os::raw::c_long; pub type __syscall_ulong_t = ::std::os::raw::c_ulong; pub type __loff_t = __off64_t; pub type __caddr_t = *mut ::std::os::raw::c_char; pub type __intptr_t = ::std::os::raw::c_long; pub type __socklen_t = ::std::os::raw::c_uint; pub type __sig_atomic_t = ::std::os::raw::c_int; pub type u_char = __u_char; pub type u_short = __u_short; pub type u_int = __u_int; pub type u_long = __u_long; pub type quad_t = __quad_t; pub type u_quad_t = __u_quad_t; pub type fsid_t = __fsid_t; pub type loff_t = __loff_t; pub type ino_t = __ino_t; pub type dev_t = __dev_t; pub type gid_t = __gid_t; pub type mode_t = __mode_t; pub type nlink_t = __nlink_t; pub type uid_t = __uid_t; pub type off_t = __off_t; pub type pid_t = __pid_t; pub type id_t = __id_t; pub type ssize_t = __ssize_t; pub type daddr_t = __daddr_t; pub type caddr_t = __caddr_t; pub type key_t = __key_t; pub type clock_t = __clock_t; pub type clockid_t = __clockid_t; pub type time_t = __time_t; pub type timer_t = __timer_t; pub type ulong = ::std::os::raw::c_ulong; pub type ushort = ::std::os::raw::c_ushort; pub type uint = ::std::os::raw::c_uint; pub type u_int8_t = __uint8_t; pub type u_int16_t = __uint16_t; pub type u_int32_t = __uint32_t; pub type u_int64_t = __uint64_t; pub type register_t = ::std::os::raw::c_long; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sigset_t { pub __val: [::std::os::raw::c_ulong; 16usize], } #[test] fn bindgen_test_layout___sigset_t() { assert_eq!( ::std::mem::size_of::<__sigset_t>(), 128usize, concat!("Size of: ", stringify!(__sigset_t)) ); assert_eq!( ::std::mem::align_of::<__sigset_t>(), 8usize, concat!("Alignment of ", stringify!(__sigset_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__sigset_t), "::", stringify!(__val) ) ); } pub type sigset_t = __sigset_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timeval { pub tv_sec: __time_t, pub tv_usec: __suseconds_t, } #[test] fn bindgen_test_layout_timeval() { assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(timeval)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(timeval)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(timeval), "::", stringify!(tv_sec) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(timeval), "::", stringify!(tv_usec) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct timespec { pub tv_sec: __time_t, pub tv_nsec: __syscall_slong_t, } #[test] fn bindgen_test_layout_timespec() { assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(timespec)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(timespec)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(timespec), "::", stringify!(tv_sec) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(timespec), "::", stringify!(tv_nsec) ) ); } pub type suseconds_t = __suseconds_t; pub type __fd_mask = ::std::os::raw::c_long; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct fd_set { pub __fds_bits: [__fd_mask; 16usize], } #[test] fn bindgen_test_layout_fd_set() { assert_eq!( ::std::mem::size_of::(), 128usize, concat!("Size of: ", stringify!(fd_set)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(fd_set)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__fds_bits as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(fd_set), "::", stringify!(__fds_bits) ) ); } pub type fd_mask = __fd_mask; extern "C" { pub fn select( __nfds: ::std::os::raw::c_int, __readfds: *mut fd_set, __writefds: *mut fd_set, __exceptfds: *mut fd_set, __timeout: *mut timeval, ) -> ::std::os::raw::c_int; } extern "C" { pub fn pselect( __nfds: ::std::os::raw::c_int, __readfds: *mut fd_set, __writefds: *mut fd_set, __exceptfds: *mut fd_set, __timeout: *const timespec, __sigmask: *const __sigset_t, ) -> ::std::os::raw::c_int; } pub type blksize_t = __blksize_t; pub type blkcnt_t = __blkcnt_t; pub type fsblkcnt_t = __fsblkcnt_t; pub type fsfilcnt_t = __fsfilcnt_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_internal_list { pub __prev: *mut __pthread_internal_list, pub __next: *mut __pthread_internal_list, } #[test] fn bindgen_test_layout___pthread_internal_list() { assert_eq!( ::std::mem::size_of::<__pthread_internal_list>(), 16usize, concat!("Size of: ", stringify!(__pthread_internal_list)) ); assert_eq!( ::std::mem::align_of::<__pthread_internal_list>(), 8usize, concat!("Alignment of ", stringify!(__pthread_internal_list)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__prev as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_internal_list), "::", stringify!(__prev) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__next as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(__pthread_internal_list), "::", stringify!(__next) ) ); } pub type __pthread_list_t = __pthread_internal_list; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_internal_slist { pub __next: *mut __pthread_internal_slist, } #[test] fn bindgen_test_layout___pthread_internal_slist() { assert_eq!( ::std::mem::size_of::<__pthread_internal_slist>(), 8usize, concat!("Size of: ", stringify!(__pthread_internal_slist)) ); assert_eq!( ::std::mem::align_of::<__pthread_internal_slist>(), 8usize, concat!("Alignment of ", stringify!(__pthread_internal_slist)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_internal_slist>())).__next as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_internal_slist), "::", stringify!(__next) ) ); } pub type __pthread_slist_t = __pthread_internal_slist; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_mutex_s { pub __lock: ::std::os::raw::c_int, pub __count: ::std::os::raw::c_uint, pub __owner: ::std::os::raw::c_int, pub __nusers: ::std::os::raw::c_uint, pub __kind: ::std::os::raw::c_int, pub __spins: ::std::os::raw::c_short, pub __elision: ::std::os::raw::c_short, pub __list: __pthread_list_t, } #[test] fn bindgen_test_layout___pthread_mutex_s() { assert_eq!( ::std::mem::size_of::<__pthread_mutex_s>(), 40usize, concat!("Size of: ", stringify!(__pthread_mutex_s)) ); assert_eq!( ::std::mem::align_of::<__pthread_mutex_s>(), 8usize, concat!("Alignment of ", stringify!(__pthread_mutex_s)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__lock as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_mutex_s), "::", stringify!(__lock) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__count as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(__pthread_mutex_s), "::", stringify!(__count) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__owner as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(__pthread_mutex_s), "::", stringify!(__owner) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__nusers as *const _ as usize }, 12usize, concat!( "Offset of field: ", stringify!(__pthread_mutex_s), "::", stringify!(__nusers) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__kind as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!(__pthread_mutex_s), "::", stringify!(__kind) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__spins as *const _ as usize }, 20usize, concat!( "Offset of field: ", stringify!(__pthread_mutex_s), "::", stringify!(__spins) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__elision as *const _ as usize }, 22usize, concat!( "Offset of field: ", stringify!(__pthread_mutex_s), "::", stringify!(__elision) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__list as *const _ as usize }, 24usize, concat!( "Offset of field: ", stringify!(__pthread_mutex_s), "::", stringify!(__list) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_rwlock_arch_t { pub __readers: ::std::os::raw::c_uint, pub __writers: ::std::os::raw::c_uint, pub __wrphase_futex: ::std::os::raw::c_uint, pub __writers_futex: ::std::os::raw::c_uint, pub __pad3: ::std::os::raw::c_uint, pub __pad4: ::std::os::raw::c_uint, pub __cur_writer: ::std::os::raw::c_int, pub __shared: ::std::os::raw::c_int, pub __rwelision: ::std::os::raw::c_schar, pub __pad1: [::std::os::raw::c_uchar; 7usize], pub __pad2: ::std::os::raw::c_ulong, pub __flags: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout___pthread_rwlock_arch_t() { assert_eq!( ::std::mem::size_of::<__pthread_rwlock_arch_t>(), 56usize, concat!("Size of: ", stringify!(__pthread_rwlock_arch_t)) ); assert_eq!( ::std::mem::align_of::<__pthread_rwlock_arch_t>(), 8usize, concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__readers as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__readers) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__writers) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__wrphase_futex as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__wrphase_futex) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers_futex as *const _ as usize }, 12usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__writers_futex) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad3 as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__pad3) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad4 as *const _ as usize }, 20usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__pad4) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__cur_writer as *const _ as usize }, 24usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__cur_writer) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__shared as *const _ as usize }, 28usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__shared) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__rwelision as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__rwelision) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad1 as *const _ as usize }, 33usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__pad1) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad2 as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__pad2) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__flags as *const _ as usize }, 48usize, concat!( "Offset of field: ", stringify!(__pthread_rwlock_arch_t), "::", stringify!(__flags) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub struct __pthread_cond_s { pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, pub __g_refs: [::std::os::raw::c_uint; 2usize], pub __g_size: [::std::os::raw::c_uint; 2usize], pub __g1_orig_size: ::std::os::raw::c_uint, pub __wrefs: ::std::os::raw::c_uint, pub __g_signals: [::std::os::raw::c_uint; 2usize], } #[repr(C)] #[derive(Copy, Clone)] pub union __pthread_cond_s__bindgen_ty_1 { pub __wseq: ::std::os::raw::c_ulonglong, pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { pub __low: ::std::os::raw::c_uint, pub __high: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), 8usize, concat!( "Size of: ", stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), 4usize, concat!( "Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__low as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1), "::", stringify!(__low) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__high as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1), "::", stringify!(__high) ) ); } #[test] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1>(), 8usize, concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1>(), 8usize, concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_1)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s__bindgen_ty_1), "::", stringify!(__wseq) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq32 as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s__bindgen_ty_1), "::", stringify!(__wseq32) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union __pthread_cond_s__bindgen_ty_2 { pub __g1_start: ::std::os::raw::c_ulonglong, pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { pub __low: ::std::os::raw::c_uint, pub __high: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), 8usize, concat!( "Size of: ", stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), 4usize, concat!( "Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__low as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1), "::", stringify!(__low) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__high as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1), "::", stringify!(__high) ) ); } #[test] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2() { assert_eq!( ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2>(), 8usize, concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2>(), 8usize, concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_2)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s__bindgen_ty_2), "::", stringify!(__g1_start) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start32 as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s__bindgen_ty_2), "::", stringify!(__g1_start32) ) ); } #[test] fn bindgen_test_layout___pthread_cond_s() { assert_eq!( ::std::mem::size_of::<__pthread_cond_s>(), 48usize, concat!("Size of: ", stringify!(__pthread_cond_s)) ); assert_eq!( ::std::mem::align_of::<__pthread_cond_s>(), 8usize, concat!("Alignment of ", stringify!(__pthread_cond_s)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_refs as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s), "::", stringify!(__g_refs) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_size as *const _ as usize }, 24usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s), "::", stringify!(__g_size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g1_orig_size as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s), "::", stringify!(__g1_orig_size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__wrefs as *const _ as usize }, 36usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s), "::", stringify!(__wrefs) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_signals as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(__pthread_cond_s), "::", stringify!(__g_signals) ) ); } pub type pthread_t = ::std::os::raw::c_ulong; #[repr(C)] #[derive(Copy, Clone)] pub union pthread_mutexattr_t { pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_pthread_mutexattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(pthread_mutexattr_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(pthread_mutexattr_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_mutexattr_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_mutexattr_t), "::", stringify!(__align) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union pthread_condattr_t { pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_pthread_condattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(pthread_condattr_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(pthread_condattr_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_condattr_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_condattr_t), "::", stringify!(__align) ) ); } pub type pthread_key_t = ::std::os::raw::c_uint; pub type pthread_once_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Copy, Clone)] pub union pthread_attr_t { pub __size: [::std::os::raw::c_char; 56usize], pub __align: ::std::os::raw::c_long, } #[test] fn bindgen_test_layout_pthread_attr_t() { assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(pthread_attr_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(pthread_attr_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_attr_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_attr_t), "::", stringify!(__align) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union pthread_mutex_t { pub __data: __pthread_mutex_s, pub __size: [::std::os::raw::c_char; 40usize], pub __align: ::std::os::raw::c_long, } #[test] fn bindgen_test_layout_pthread_mutex_t() { assert_eq!( ::std::mem::size_of::(), 40usize, concat!("Size of: ", stringify!(pthread_mutex_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(pthread_mutex_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_mutex_t), "::", stringify!(__data) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_mutex_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_mutex_t), "::", stringify!(__align) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union pthread_cond_t { pub __data: __pthread_cond_s, pub __size: [::std::os::raw::c_char; 48usize], pub __align: ::std::os::raw::c_longlong, } #[test] fn bindgen_test_layout_pthread_cond_t() { assert_eq!( ::std::mem::size_of::(), 48usize, concat!("Size of: ", stringify!(pthread_cond_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(pthread_cond_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_cond_t), "::", stringify!(__data) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_cond_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_cond_t), "::", stringify!(__align) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union pthread_rwlock_t { pub __data: __pthread_rwlock_arch_t, pub __size: [::std::os::raw::c_char; 56usize], pub __align: ::std::os::raw::c_long, } #[test] fn bindgen_test_layout_pthread_rwlock_t() { assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(pthread_rwlock_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(pthread_rwlock_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_rwlock_t), "::", stringify!(__data) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_rwlock_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_rwlock_t), "::", stringify!(__align) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union pthread_rwlockattr_t { pub __size: [::std::os::raw::c_char; 8usize], pub __align: ::std::os::raw::c_long, } #[test] fn bindgen_test_layout_pthread_rwlockattr_t() { assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(pthread_rwlockattr_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_rwlockattr_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_rwlockattr_t), "::", stringify!(__align) ) ); } pub type pthread_spinlock_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Copy, Clone)] pub union pthread_barrier_t { pub __size: [::std::os::raw::c_char; 32usize], pub __align: ::std::os::raw::c_long, } #[test] fn bindgen_test_layout_pthread_barrier_t() { assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(pthread_barrier_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(pthread_barrier_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_barrier_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_barrier_t), "::", stringify!(__align) ) ); } #[repr(C)] #[derive(Copy, Clone)] pub union pthread_barrierattr_t { pub __size: [::std::os::raw::c_char; 4usize], pub __align: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout_pthread_barrierattr_t() { assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(pthread_barrierattr_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(pthread_barrierattr_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_barrierattr_t), "::", stringify!(__size) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(pthread_barrierattr_t), "::", stringify!(__align) ) ); } extern "C" { pub fn random() -> ::std::os::raw::c_long; } extern "C" { pub fn srandom(__seed: ::std::os::raw::c_uint); } extern "C" { pub fn initstate( __seed: ::std::os::raw::c_uint, __statebuf: *mut ::std::os::raw::c_char, __statelen: size_t, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct random_data { pub fptr: *mut i32, pub rptr: *mut i32, pub state: *mut i32, pub rand_type: ::std::os::raw::c_int, pub rand_deg: ::std::os::raw::c_int, pub rand_sep: ::std::os::raw::c_int, pub end_ptr: *mut i32, } #[test] fn bindgen_test_layout_random_data() { assert_eq!( ::std::mem::size_of::(), 48usize, concat!("Size of: ", stringify!(random_data)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(random_data)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).fptr as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(random_data), "::", stringify!(fptr) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).rptr as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(random_data), "::", stringify!(rptr) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!(random_data), "::", stringify!(state) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).rand_type as *const _ as usize }, 24usize, concat!( "Offset of field: ", stringify!(random_data), "::", stringify!(rand_type) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).rand_deg as *const _ as usize }, 28usize, concat!( "Offset of field: ", stringify!(random_data), "::", stringify!(rand_deg) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).rand_sep as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(random_data), "::", stringify!(rand_sep) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).end_ptr as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(random_data), "::", stringify!(end_ptr) ) ); } extern "C" { pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int; } extern "C" { pub fn srandom_r( __seed: ::std::os::raw::c_uint, __buf: *mut random_data, ) -> ::std::os::raw::c_int; } extern "C" { pub fn initstate_r( __seed: ::std::os::raw::c_uint, __statebuf: *mut ::std::os::raw::c_char, __statelen: size_t, __buf: *mut random_data, ) -> ::std::os::raw::c_int; } extern "C" { pub fn setstate_r( __statebuf: *mut ::std::os::raw::c_char, __buf: *mut random_data, ) -> ::std::os::raw::c_int; } extern "C" { pub fn rand() -> ::std::os::raw::c_int; } extern "C" { pub fn srand(__seed: ::std::os::raw::c_uint); } extern "C" { pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; } extern "C" { pub fn drand48() -> f64; } extern "C" { pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64; } extern "C" { pub fn lrand48() -> ::std::os::raw::c_long; } extern "C" { pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; } extern "C" { pub fn mrand48() -> ::std::os::raw::c_long; } extern "C" { pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; } extern "C" { pub fn srand48(__seedval: ::std::os::raw::c_long); } extern "C" { pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; } extern "C" { pub fn lcong48(__param: *mut ::std::os::raw::c_ushort); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct drand48_data { pub __x: [::std::os::raw::c_ushort; 3usize], pub __old_x: [::std::os::raw::c_ushort; 3usize], pub __c: ::std::os::raw::c_ushort, pub __init: ::std::os::raw::c_ushort, pub __a: ::std::os::raw::c_ulonglong, } #[test] fn bindgen_test_layout_drand48_data() { assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(drand48_data)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(drand48_data)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__x as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(drand48_data), "::", stringify!(__x) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__old_x as *const _ as usize }, 6usize, concat!( "Offset of field: ", stringify!(drand48_data), "::", stringify!(__old_x) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__c as *const _ as usize }, 12usize, concat!( "Offset of field: ", stringify!(drand48_data), "::", stringify!(__c) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__init as *const _ as usize }, 14usize, concat!( "Offset of field: ", stringify!(drand48_data), "::", stringify!(__init) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__a as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!(drand48_data), "::", stringify!(__a) ) ); } extern "C" { pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int; } extern "C" { pub fn erand48_r( __xsubi: *mut ::std::os::raw::c_ushort, __buffer: *mut drand48_data, __result: *mut f64, ) -> ::std::os::raw::c_int; } extern "C" { pub fn lrand48_r( __buffer: *mut drand48_data, __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } extern "C" { pub fn nrand48_r( __xsubi: *mut ::std::os::raw::c_ushort, __buffer: *mut drand48_data, __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } extern "C" { pub fn mrand48_r( __buffer: *mut drand48_data, __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } extern "C" { pub fn jrand48_r( __xsubi: *mut ::std::os::raw::c_ushort, __buffer: *mut drand48_data, __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } extern "C" { pub fn srand48_r( __seedval: ::std::os::raw::c_long, __buffer: *mut drand48_data, ) -> ::std::os::raw::c_int; } extern "C" { pub fn seed48_r( __seed16v: *mut ::std::os::raw::c_ushort, __buffer: *mut drand48_data, ) -> ::std::os::raw::c_int; } extern "C" { pub fn lcong48_r( __param: *mut ::std::os::raw::c_ushort, __buffer: *mut drand48_data, ) -> ::std::os::raw::c_int; } extern "C" { pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn calloc( __nmemb: ::std::os::raw::c_ulong, __size: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn realloc( __ptr: *mut ::std::os::raw::c_void, __size: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn reallocarray( __ptr: *mut ::std::os::raw::c_void, __nmemb: size_t, __size: size_t, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn free(__ptr: *mut ::std::os::raw::c_void); } extern "C" { pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn valloc(__size: size_t) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn posix_memalign( __memptr: *mut *mut ::std::os::raw::c_void, __alignment: size_t, __size: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn abort(); } extern "C" { pub fn atexit(__func: ::std::option::Option) -> ::std::os::raw::c_int; } extern "C" { pub fn on_exit( __func: ::std::option::Option< unsafe extern "C" fn( __status: ::std::os::raw::c_int, __arg: *mut ::std::os::raw::c_void, ), >, __arg: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } extern "C" { pub fn exit(__status: ::std::os::raw::c_int); } extern "C" { pub fn _Exit(__status: ::std::os::raw::c_int); } extern "C" { pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn setenv( __name: *const ::std::os::raw::c_char, __value: *const ::std::os::raw::c_char, __replace: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn clearenv() -> ::std::os::raw::c_int; } extern "C" { pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mkstemps( __template: *mut ::std::os::raw::c_char, __suffixlen: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn realpath( __name: *const ::std::os::raw::c_char, __resolved: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } pub type __compar_fn_t = ::std::option::Option< unsafe extern "C" fn( arg1: *const ::std::os::raw::c_void, arg2: *const ::std::os::raw::c_void, ) -> ::std::os::raw::c_int, >; extern "C" { pub fn bsearch( __key: *const ::std::os::raw::c_void, __base: *const ::std::os::raw::c_void, __nmemb: size_t, __size: size_t, __compar: __compar_fn_t, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn qsort( __base: *mut ::std::os::raw::c_void, __nmemb: size_t, __size: size_t, __compar: __compar_fn_t, ); } extern "C" { pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long; } extern "C" { pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; } extern "C" { pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t; } extern "C" { pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t; } extern "C" { pub fn lldiv( __numer: ::std::os::raw::c_longlong, __denom: ::std::os::raw::c_longlong, ) -> lldiv_t; } extern "C" { pub fn ecvt( __value: f64, __ndigit: ::std::os::raw::c_int, __decpt: *mut ::std::os::raw::c_int, __sign: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn fcvt( __value: f64, __ndigit: ::std::os::raw::c_int, __decpt: *mut ::std::os::raw::c_int, __sign: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn gcvt( __value: f64, __ndigit: ::std::os::raw::c_int, __buf: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn qecvt( __value: u128, __ndigit: ::std::os::raw::c_int, __decpt: *mut ::std::os::raw::c_int, __sign: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn qfcvt( __value: u128, __ndigit: ::std::os::raw::c_int, __decpt: *mut ::std::os::raw::c_int, __sign: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn qgcvt( __value: u128, __ndigit: ::std::os::raw::c_int, __buf: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn ecvt_r( __value: f64, __ndigit: ::std::os::raw::c_int, __decpt: *mut ::std::os::raw::c_int, __sign: *mut ::std::os::raw::c_int, __buf: *mut ::std::os::raw::c_char, __len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn fcvt_r( __value: f64, __ndigit: ::std::os::raw::c_int, __decpt: *mut ::std::os::raw::c_int, __sign: *mut ::std::os::raw::c_int, __buf: *mut ::std::os::raw::c_char, __len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn qecvt_r( __value: u128, __ndigit: ::std::os::raw::c_int, __decpt: *mut ::std::os::raw::c_int, __sign: *mut ::std::os::raw::c_int, __buf: *mut ::std::os::raw::c_char, __len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn qfcvt_r( __value: u128, __ndigit: ::std::os::raw::c_int, __decpt: *mut ::std::os::raw::c_int, __sign: *mut ::std::os::raw::c_int, __buf: *mut ::std::os::raw::c_char, __len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn mblen(__s: *const ::std::os::raw::c_char, __n: size_t) -> ::std::os::raw::c_int; } extern "C" { pub fn mbtowc( __pwc: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int; } extern "C" { pub fn mbstowcs( __pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: size_t, ) -> size_t; } extern "C" { pub fn wcstombs( __s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: size_t, ) -> size_t; } extern "C" { pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn getsubopt( __optionp: *mut *mut ::std::os::raw::c_char, __tokens: *const *mut ::std::os::raw::c_char, __valuep: *mut *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } pub type int_least8_t = __int_least8_t; pub type int_least16_t = __int_least16_t; pub type int_least32_t = __int_least32_t; pub type int_least64_t = __int_least64_t; pub type uint_least8_t = __uint_least8_t; pub type uint_least16_t = __uint_least16_t; pub type uint_least32_t = __uint_least32_t; pub type uint_least64_t = __uint_least64_t; pub type int_fast8_t = ::std::os::raw::c_schar; pub type int_fast16_t = ::std::os::raw::c_long; pub type int_fast32_t = ::std::os::raw::c_long; pub type int_fast64_t = ::std::os::raw::c_long; pub type uint_fast8_t = ::std::os::raw::c_uchar; pub type uint_fast16_t = ::std::os::raw::c_ulong; pub type uint_fast32_t = ::std::os::raw::c_ulong; pub type uint_fast64_t = ::std::os::raw::c_ulong; pub type intmax_t = __intmax_t; pub type uintmax_t = __uintmax_t; #[repr(C)] #[derive(Copy, Clone)] pub union aes_inf { pub l: u32, pub b: [u8; 4usize], } #[test] fn bindgen_test_layout_aes_inf() { assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(aes_inf)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(aes_inf)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).l as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(aes_inf), "::", stringify!(l) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(aes_inf), "::", stringify!(b) ) ); } #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct aes_encrypt_ctx { pub ks: [u32; 60usize], pub inf: aes_inf, } #[test] fn bindgen_test_layout_aes_encrypt_ctx() { assert_eq!( ::std::mem::size_of::(), 256usize, concat!("Size of: ", stringify!(aes_encrypt_ctx)) ); assert_eq!( ::std::mem::align_of::(), 16usize, concat!("Alignment of ", stringify!(aes_encrypt_ctx)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).ks as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(aes_encrypt_ctx), "::", stringify!(ks) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).inf as *const _ as usize }, 240usize, concat!( "Offset of field: ", stringify!(aes_encrypt_ctx), "::", stringify!(inf) ) ); } #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct aes_decrypt_ctx { pub ks: [u32; 60usize], pub inf: aes_inf, } #[test] fn bindgen_test_layout_aes_decrypt_ctx() { assert_eq!( ::std::mem::size_of::(), 256usize, concat!("Size of: ", stringify!(aes_decrypt_ctx)) ); assert_eq!( ::std::mem::align_of::(), 16usize, concat!("Alignment of ", stringify!(aes_decrypt_ctx)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).ks as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(aes_decrypt_ctx), "::", stringify!(ks) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).inf as *const _ as usize }, 240usize, concat!( "Offset of field: ", stringify!(aes_decrypt_ctx), "::", stringify!(inf) ) ); } extern "C" { pub fn aes_init() -> ::std::os::raw::c_int; } extern "C" { pub fn aes_encrypt_key128( key: *const ::std::os::raw::c_uchar, cx: *mut aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_encrypt_key192( key: *const ::std::os::raw::c_uchar, cx: *mut aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_encrypt_key256( key: *const ::std::os::raw::c_uchar, cx: *mut aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_encrypt( in_: *const ::std::os::raw::c_uchar, out: *mut ::std::os::raw::c_uchar, cx: *const aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_decrypt_key128( key: *const ::std::os::raw::c_uchar, cx: *mut aes_decrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_decrypt_key192( key: *const ::std::os::raw::c_uchar, cx: *mut aes_decrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_decrypt_key256( key: *const ::std::os::raw::c_uchar, cx: *mut aes_decrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_decrypt( in_: *const ::std::os::raw::c_uchar, out: *mut ::std::os::raw::c_uchar, cx: *const aes_decrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_test_alignment_detection(n: ::std::os::raw::c_uint) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_ecb_encrypt( ibuf: *const ::std::os::raw::c_uchar, obuf: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, cx: *const aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_ecb_decrypt( ibuf: *const ::std::os::raw::c_uchar, obuf: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, cx: *const aes_decrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_cbc_encrypt( ibuf: *const ::std::os::raw::c_uchar, obuf: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, iv: *mut ::std::os::raw::c_uchar, cx: *const aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_cbc_decrypt( ibuf: *const ::std::os::raw::c_uchar, obuf: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, iv: *mut ::std::os::raw::c_uchar, cx: *const aes_decrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_mode_reset(cx: *mut aes_encrypt_ctx) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_cfb_encrypt( ibuf: *const ::std::os::raw::c_uchar, obuf: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, iv: *mut ::std::os::raw::c_uchar, cx: *mut aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_cfb_decrypt( ibuf: *const ::std::os::raw::c_uchar, obuf: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, iv: *mut ::std::os::raw::c_uchar, cx: *mut aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_ofb_crypt( ibuf: *const ::std::os::raw::c_uchar, obuf: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, iv: *mut ::std::os::raw::c_uchar, cx: *mut aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } pub type cbuf_inc = ::std::option::Option; extern "C" { pub fn aes_ctr_crypt( ibuf: *const ::std::os::raw::c_uchar, obuf: *mut ::std::os::raw::c_uchar, len: ::std::os::raw::c_int, cbuf: *mut ::std::os::raw::c_uchar, ctr_inc: cbuf_inc, cx: *mut aes_encrypt_ctx, ) -> ::std::os::raw::c_int; } extern "C" { pub fn aes_ctr_cbuf_inc(cbuf: *mut ::std::os::raw::c_uchar); } extern "C" { pub fn memcpy( __dest: *mut ::std::os::raw::c_void, __src: *const ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn memmove( __dest: *mut ::std::os::raw::c_void, __src: *const ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn memccpy( __dest: *mut ::std::os::raw::c_void, __src: *const ::std::os::raw::c_void, __c: ::std::os::raw::c_int, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn memset( __s: *mut ::std::os::raw::c_void, __c: ::std::os::raw::c_int, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn memcmp( __s1: *const ::std::os::raw::c_void, __s2: *const ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } extern "C" { pub fn memchr( __s: *const ::std::os::raw::c_void, __c: ::std::os::raw::c_int, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn strcpy( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strncpy( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strcat( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strncat( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strcmp( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn strncmp( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } extern "C" { pub fn strcoll( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn strxfrm( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_ulong; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __locale_struct { pub __locales: [*mut __locale_data; 13usize], pub __ctype_b: *const ::std::os::raw::c_ushort, pub __ctype_tolower: *const ::std::os::raw::c_int, pub __ctype_toupper: *const ::std::os::raw::c_int, pub __names: [*const ::std::os::raw::c_char; 13usize], } #[test] fn bindgen_test_layout___locale_struct() { assert_eq!( ::std::mem::size_of::<__locale_struct>(), 232usize, concat!("Size of: ", stringify!(__locale_struct)) ); assert_eq!( ::std::mem::align_of::<__locale_struct>(), 8usize, concat!("Alignment of ", stringify!(__locale_struct)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__locale_struct>())).__locales as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__locales) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_b as *const _ as usize }, 104usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__ctype_b) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_tolower as *const _ as usize }, 112usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__ctype_tolower) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_toupper as *const _ as usize }, 120usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__ctype_toupper) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__locale_struct>())).__names as *const _ as usize }, 128usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__names) ) ); } pub type __locale_t = *mut __locale_struct; pub type locale_t = __locale_t; extern "C" { pub fn strcoll_l( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, __l: locale_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn strxfrm_l( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, __n: size_t, __l: locale_t, ) -> size_t; } extern "C" { pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strndup( __string: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strchr( __s: *const ::std::os::raw::c_char, __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strrchr( __s: *const ::std::os::raw::c_char, __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strcspn( __s: *const ::std::os::raw::c_char, __reject: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_ulong; } extern "C" { pub fn strspn( __s: *const ::std::os::raw::c_char, __accept: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_ulong; } extern "C" { pub fn strpbrk( __s: *const ::std::os::raw::c_char, __accept: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strstr( __haystack: *const ::std::os::raw::c_char, __needle: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strtok( __s: *mut ::std::os::raw::c_char, __delim: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn __strtok_r( __s: *mut ::std::os::raw::c_char, __delim: *const ::std::os::raw::c_char, __save_ptr: *mut *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strtok_r( __s: *mut ::std::os::raw::c_char, __delim: *const ::std::os::raw::c_char, __save_ptr: *mut *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; } extern "C" { pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: size_t) -> size_t; } extern "C" { pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } extern "C" { #[link_name = "\u{1}__xpg_strerror_r"] pub fn strerror_r( __errnum: ::std::os::raw::c_int, __buf: *mut ::std::os::raw::c_char, __buflen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn strerror_l( __errnum: ::std::os::raw::c_int, __l: locale_t, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn bcmp( __s1: *const ::std::os::raw::c_void, __s2: *const ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } extern "C" { pub fn bcopy( __src: *const ::std::os::raw::c_void, __dest: *mut ::std::os::raw::c_void, __n: size_t, ); } extern "C" { pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong); } extern "C" { pub fn index( __s: *const ::std::os::raw::c_char, __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn rindex( __s: *const ::std::os::raw::c_char, __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { pub fn ffsl(__l: ::std::os::raw::c_long) -> ::std::os::raw::c_int; } extern "C" { pub fn ffsll(__ll: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; } extern "C" { pub fn strcasecmp( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn strncasecmp( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } extern "C" { pub fn strcasecmp_l( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, __loc: locale_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn strncasecmp_l( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, __n: size_t, __loc: locale_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn explicit_bzero(__s: *mut ::std::os::raw::c_void, __n: size_t); } extern "C" { pub fn strsep( __stringp: *mut *mut ::std::os::raw::c_char, __delim: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn __stpcpy( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn stpcpy( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn __stpncpy( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, __n: size_t, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn stpncpy( __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } pub type bignum25519 = [u32; 10usize]; extern "C" { pub fn curve25519_copy(out: *mut u32, in_: *mut u32); } extern "C" { pub fn curve25519_add(out: *mut u32, a: *mut u32, b: *mut u32); } extern "C" { pub fn curve25519_add_after_basic(out: *mut u32, a: *mut u32, b: *mut u32); } extern "C" { pub fn curve25519_add_reduce(out: *mut u32, a: *mut u32, b: *mut u32); } extern "C" { pub fn curve25519_sub(out: *mut u32, a: *mut u32, b: *mut u32); } extern "C" { pub fn curve25519_scalar_product(out: *mut u32, in_: *mut u32, scalar: u32); } extern "C" { pub fn curve25519_sub_after_basic(out: *mut u32, a: *mut u32, b: *mut u32); } extern "C" { pub fn curve25519_sub_reduce(out: *mut u32, a: *mut u32, b: *mut u32); } extern "C" { pub fn curve25519_neg(out: *mut u32, a: *mut u32); } extern "C" { pub fn curve25519_mul(out: *mut u32, a: *mut u32, b: *mut u32); } extern "C" { pub fn curve25519_square(out: *mut u32, in_: *mut u32); } extern "C" { pub fn curve25519_square_times(out: *mut u32, in_: *mut u32, count: ::std::os::raw::c_int); } extern "C" { pub fn curve25519_expand(out: *mut u32, in_: *const ::std::os::raw::c_uchar); } extern "C" { pub fn curve25519_contract(out: *mut ::std::os::raw::c_uchar, in_: *mut u32); } extern "C" { pub fn curve25519_swap_conditional(a: *mut u32, b: *mut u32, iswap: u32); } extern "C" { pub fn curve25519_set(r: *mut u32, x: u32); } extern "C" { pub fn curve25519_set_d(r: *mut u32); } extern "C" { pub fn curve25519_set_2d(r: *mut u32); } extern "C" { pub fn curve25519_set_sqrtneg1(r: *mut u32); } extern "C" { pub fn curve25519_isnegative(f: *mut u32) -> ::std::os::raw::c_int; } extern "C" { pub fn curve25519_isnonzero(f: *mut u32) -> ::std::os::raw::c_int; } extern "C" { pub fn curve25519_reduce(r: *mut u32, in_: *mut u32); } extern "C" { pub fn curve25519_divpowm1(r: *mut u32, u: *mut u32, v: *mut u32); } extern "C" { pub fn curve25519_expand_reduce(out: *mut u32, in_: *const ::std::os::raw::c_uchar); } extern "C" { pub fn curve25519_pow_two5mtwo0_two250mtwo0(b: *mut u32); } extern "C" { pub fn curve25519_recip(out: *mut u32, z: *mut u32); } extern "C" { pub fn curve25519_pow_two252m3(two252m3: *mut u32, z: *mut u32); } pub type bignum256modm_element_t = u32; pub type bignum256modm = [bignum256modm_element_t; 9usize]; extern "C" { pub fn reduce256_modm(r: *mut bignum256modm_element_t); } extern "C" { pub fn barrett_reduce256_modm( r: *mut bignum256modm_element_t, q1: *mut bignum256modm_element_t, r1: *mut bignum256modm_element_t, ); } extern "C" { pub fn add256_modm( r: *mut bignum256modm_element_t, x: *mut bignum256modm_element_t, y: *mut bignum256modm_element_t, ); } extern "C" { pub fn neg256_modm(r: *mut bignum256modm_element_t, x: *mut bignum256modm_element_t); } extern "C" { pub fn sub256_modm( r: *mut bignum256modm_element_t, x: *mut bignum256modm_element_t, y: *mut bignum256modm_element_t, ); } extern "C" { pub fn mul256_modm( r: *mut bignum256modm_element_t, x: *mut bignum256modm_element_t, y: *mut bignum256modm_element_t, ); } extern "C" { pub fn expand256_modm( out: *mut bignum256modm_element_t, in_: *const ::std::os::raw::c_uchar, len: size_t, ); } extern "C" { pub fn expand_raw256_modm( out: *mut bignum256modm_element_t, in_: *const ::std::os::raw::c_uchar, ); } extern "C" { pub fn is_reduced256_modm(in_: *mut bignum256modm_element_t) -> ::std::os::raw::c_int; } extern "C" { pub fn contract256_modm(out: *mut ::std::os::raw::c_uchar, in_: *mut bignum256modm_element_t); } extern "C" { pub fn contract256_window4_modm( r: *mut ::std::os::raw::c_schar, in_: *mut bignum256modm_element_t, ); } extern "C" { pub fn contract256_slidingwindow_modm( r: *mut ::std::os::raw::c_schar, s: *mut bignum256modm_element_t, windowsize: ::std::os::raw::c_int, ); } extern "C" { pub fn set256_modm(r: *mut bignum256modm_element_t, v: u64); } extern "C" { pub fn get256_modm(v: *mut u64, r: *mut bignum256modm_element_t) -> ::std::os::raw::c_int; } extern "C" { pub fn eq256_modm( x: *mut bignum256modm_element_t, y: *mut bignum256modm_element_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn cmp256_modm( x: *mut bignum256modm_element_t, y: *mut bignum256modm_element_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn iszero256_modm(x: *mut bignum256modm_element_t) -> ::std::os::raw::c_int; } extern "C" { pub fn copy256_modm(r: *mut bignum256modm_element_t, x: *mut bignum256modm_element_t); } extern "C" { pub fn check256_modm(x: *mut bignum256modm_element_t) -> ::std::os::raw::c_int; } extern "C" { pub fn mulsub256_modm( r: *mut bignum256modm_element_t, a: *mut bignum256modm_element_t, b: *mut bignum256modm_element_t, c: *mut bignum256modm_element_t, ); } extern "C" { pub fn muladd256_modm( r: *mut bignum256modm_element_t, a: *mut bignum256modm_element_t, b: *mut bignum256modm_element_t, c: *mut bignum256modm_element_t, ); } pub type hash_512bits = [::std::os::raw::c_uchar; 64usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ge25519_t { pub x: bignum25519, pub y: bignum25519, pub z: bignum25519, pub t: bignum25519, } #[test] fn bindgen_test_layout_ge25519_t() { assert_eq!( ::std::mem::size_of::(), 160usize, concat!("Size of: ", stringify!(ge25519_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(ge25519_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(ge25519_t), "::", stringify!(x) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(ge25519_t), "::", stringify!(y) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, 80usize, concat!( "Offset of field: ", stringify!(ge25519_t), "::", stringify!(z) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).t as *const _ as usize }, 120usize, concat!( "Offset of field: ", stringify!(ge25519_t), "::", stringify!(t) ) ); } pub type ge25519 = ge25519_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ge25519_p1p1_t { pub x: bignum25519, pub y: bignum25519, pub z: bignum25519, pub t: bignum25519, } #[test] fn bindgen_test_layout_ge25519_p1p1_t() { assert_eq!( ::std::mem::size_of::(), 160usize, concat!("Size of: ", stringify!(ge25519_p1p1_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(ge25519_p1p1_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(ge25519_p1p1_t), "::", stringify!(x) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(ge25519_p1p1_t), "::", stringify!(y) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, 80usize, concat!( "Offset of field: ", stringify!(ge25519_p1p1_t), "::", stringify!(z) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).t as *const _ as usize }, 120usize, concat!( "Offset of field: ", stringify!(ge25519_p1p1_t), "::", stringify!(t) ) ); } pub type ge25519_p1p1 = ge25519_p1p1_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ge25519_niels_t { pub ysubx: bignum25519, pub xaddy: bignum25519, pub t2d: bignum25519, } #[test] fn bindgen_test_layout_ge25519_niels_t() { assert_eq!( ::std::mem::size_of::(), 120usize, concat!("Size of: ", stringify!(ge25519_niels_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(ge25519_niels_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).ysubx as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(ge25519_niels_t), "::", stringify!(ysubx) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).xaddy as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(ge25519_niels_t), "::", stringify!(xaddy) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).t2d as *const _ as usize }, 80usize, concat!( "Offset of field: ", stringify!(ge25519_niels_t), "::", stringify!(t2d) ) ); } pub type ge25519_niels = ge25519_niels_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ge25519_pniels_t { pub ysubx: bignum25519, pub xaddy: bignum25519, pub z: bignum25519, pub t2d: bignum25519, } #[test] fn bindgen_test_layout_ge25519_pniels_t() { assert_eq!( ::std::mem::size_of::(), 160usize, concat!("Size of: ", stringify!(ge25519_pniels_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(ge25519_pniels_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).ysubx as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(ge25519_pniels_t), "::", stringify!(ysubx) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).xaddy as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(ge25519_pniels_t), "::", stringify!(xaddy) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, 80usize, concat!( "Offset of field: ", stringify!(ge25519_pniels_t), "::", stringify!(z) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).t2d as *const _ as usize }, 120usize, concat!( "Offset of field: ", stringify!(ge25519_pniels_t), "::", stringify!(t2d) ) ); } pub type ge25519_pniels = ge25519_pniels_t; extern "C" { pub static mut ge25519_niels_base_multiples: [[u8; 96usize]; 256usize]; } extern "C" { pub static ge25519_basepoint: ge25519; } extern "C" { pub static ge25519_ecd: bignum25519; } extern "C" { pub static ge25519_ec2d: bignum25519; } extern "C" { pub static ge25519_sqrtneg1: bignum25519; } extern "C" { pub static ge25519_niels_sliding_multiples: [ge25519_niels; 32usize]; } extern "C" { pub fn ed25519_verify( x: *const ::std::os::raw::c_uchar, y: *const ::std::os::raw::c_uchar, len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ge25519_p1p1_to_partial(r: *mut ge25519, p: *const ge25519_p1p1); } extern "C" { pub fn ge25519_p1p1_to_full(r: *mut ge25519, p: *const ge25519_p1p1); } extern "C" { pub fn ge25519_full_to_pniels(p: *mut ge25519_pniels, r: *const ge25519); } extern "C" { pub fn ge25519_double_p1p1(r: *mut ge25519_p1p1, p: *const ge25519); } extern "C" { pub fn ge25519_nielsadd2_p1p1( r: *mut ge25519_p1p1, p: *const ge25519, q: *const ge25519_niels, signbit: ::std::os::raw::c_uchar, ); } extern "C" { pub fn ge25519_double_scalarmult_vartime2( r: *mut ge25519, p1: *const ge25519, s1: *mut bignum256modm_element_t, p2: *const ge25519, s2: *mut bignum256modm_element_t, ); } extern "C" { pub fn ge25519_pnielsadd_p1p1( r: *mut ge25519_p1p1, p: *const ge25519, q: *const ge25519_pniels, signbit: ::std::os::raw::c_uchar, ); } extern "C" { pub fn ge25519_double_partial(r: *mut ge25519, p: *const ge25519); } extern "C" { pub fn ge25519_double(r: *mut ge25519, p: *const ge25519); } extern "C" { pub fn ge25519_nielsadd2(r: *mut ge25519, q: *const ge25519_niels); } extern "C" { pub fn ge25519_pnielsadd(r: *mut ge25519_pniels, p: *const ge25519, q: *const ge25519_pniels); } extern "C" { pub fn ge25519_pack(r: *mut ::std::os::raw::c_uchar, p: *const ge25519); } extern "C" { pub fn ge25519_unpack_negative_vartime( r: *mut ge25519, p: *const ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ge25519_set_neutral(r: *mut ge25519); } extern "C" { pub fn ge25519_double_scalarmult_vartime( r: *mut ge25519, p1: *const ge25519, s1: *mut bignum256modm_element_t, s2: *mut bignum256modm_element_t, ); } extern "C" { pub fn ge25519_scalarmult( r: *mut ge25519, p1: *const ge25519, s1: *mut bignum256modm_element_t, ); } extern "C" { pub fn ge25519_scalarmult_base_choose_niels( t: *mut ge25519_niels, table: *const [u8; 96usize], pos: u32, b: ::std::os::raw::c_schar, ); } extern "C" { pub fn ge25519_scalarmult_base_niels( r: *mut ge25519, basepoint_table: *const [u8; 96usize], s: *mut bignum256modm_element_t, ); } extern "C" { pub fn ge25519_check(r: *const ge25519) -> ::std::os::raw::c_int; } extern "C" { pub fn ge25519_eq(a: *const ge25519, b: *const ge25519) -> ::std::os::raw::c_int; } extern "C" { pub fn ge25519_copy(dst: *mut ge25519, src: *const ge25519); } extern "C" { pub fn ge25519_set_base(r: *mut ge25519); } extern "C" { pub fn ge25519_mul8(r: *mut ge25519, t: *const ge25519); } extern "C" { pub fn ge25519_neg_partial(r: *mut ge25519); } extern "C" { pub fn ge25519_neg_full(r: *mut ge25519); } extern "C" { pub fn ge25519_reduce(r: *mut ge25519, t: *const ge25519); } extern "C" { pub fn ge25519_norm(r: *mut ge25519, t: *const ge25519); } extern "C" { pub fn ge25519_add( r: *mut ge25519, a: *const ge25519, b: *const ge25519, signbit: ::std::os::raw::c_uchar, ); } extern "C" { pub fn ge25519_fromfe_frombytes_vartime(r: *mut ge25519, s: *const ::std::os::raw::c_uchar); } extern "C" { pub fn ge25519_unpack_vartime( r: *mut ge25519, s: *const ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ge25519_scalarmult_base_wrapper(r: *mut ge25519, s: *mut bignum256modm_element_t); } #[doc = " SHA3 Algorithm context."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct SHA3_CTX { pub hash: [u64; 25usize], pub message: [u64; 24usize], pub rest: ::std::os::raw::c_uint, pub block_size: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout_SHA3_CTX() { assert_eq!( ::std::mem::size_of::(), 400usize, concat!("Size of: ", stringify!(SHA3_CTX)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(SHA3_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).hash as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(SHA3_CTX), "::", stringify!(hash) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).message as *const _ as usize }, 200usize, concat!( "Offset of field: ", stringify!(SHA3_CTX), "::", stringify!(message) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).rest as *const _ as usize }, 392usize, concat!( "Offset of field: ", stringify!(SHA3_CTX), "::", stringify!(rest) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).block_size as *const _ as usize }, 396usize, concat!( "Offset of field: ", stringify!(SHA3_CTX), "::", stringify!(block_size) ) ); } extern "C" { pub fn sha3_224_Init(ctx: *mut SHA3_CTX); } extern "C" { pub fn sha3_256_Init(ctx: *mut SHA3_CTX); } extern "C" { pub fn sha3_384_Init(ctx: *mut SHA3_CTX); } extern "C" { pub fn sha3_512_Init(ctx: *mut SHA3_CTX); } extern "C" { pub fn sha3_Update(ctx: *mut SHA3_CTX, msg: *const ::std::os::raw::c_uchar, size: size_t); } extern "C" { pub fn sha3_Final(ctx: *mut SHA3_CTX, result: *mut ::std::os::raw::c_uchar); } extern "C" { pub fn keccak_Final(ctx: *mut SHA3_CTX, result: *mut ::std::os::raw::c_uchar); } extern "C" { pub fn keccak_256( data: *const ::std::os::raw::c_uchar, len: size_t, digest: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn keccak_512( data: *const ::std::os::raw::c_uchar, len: size_t, digest: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn sha3_256( data: *const ::std::os::raw::c_uchar, len: size_t, digest: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn sha3_512( data: *const ::std::os::raw::c_uchar, len: size_t, digest: *mut ::std::os::raw::c_uchar, ); } extern "C" { #[doc = " Copyright (c) 2013-2014 Tomas Dzetkulic"] #[doc = " Copyright (c) 2013-2014 Pavol Rusnak"] #[doc = ""] #[doc = " Permission is hereby granted, free of charge, to any person obtaining"] #[doc = " a copy of this software and associated documentation files (the \"Software\"),"] #[doc = " to deal in the Software without restriction, including without limitation"] #[doc = " the rights to use, copy, modify, merge, publish, distribute, sublicense,"] #[doc = " and/or sell copies of the Software, and to permit persons to whom the"] #[doc = " Software is furnished to do so, subject to the following conditions:"] #[doc = ""] #[doc = " The above copyright notice and this permission notice shall be included"] #[doc = " in all copies or substantial portions of the Software."] #[doc = ""] #[doc = " THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS"] #[doc = " OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,"] #[doc = " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL"] #[doc = " THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES"] #[doc = " OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,"] #[doc = " ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR"] #[doc = " OTHER DEALINGS IN THE SOFTWARE."] pub static wordlist: [*const ::std::os::raw::c_char; 2049usize]; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bignum256 { pub val: [u32; 9usize], } #[test] fn bindgen_test_layout_bignum256() { assert_eq!( ::std::mem::size_of::(), 36usize, concat!("Size of: ", stringify!(bignum256)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(bignum256)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(bignum256), "::", stringify!(val) ) ); } extern "C" { pub fn bn_read_be(in_number: *const u8, out_number: *mut bignum256); } extern "C" { pub fn bn_write_be(in_number: *const bignum256, out_number: *mut u8); } extern "C" { pub fn bn_read_le(in_number: *const u8, out_number: *mut bignum256); } extern "C" { pub fn bn_write_le(in_number: *const bignum256, out_number: *mut u8); } extern "C" { pub fn bn_read_uint32(in_number: u32, out_number: *mut bignum256); } extern "C" { pub fn bn_read_uint64(in_number: u64, out_number: *mut bignum256); } extern "C" { pub fn bn_bitcount(x: *const bignum256) -> ::std::os::raw::c_int; } extern "C" { pub fn bn_digitcount(x: *const bignum256) -> ::std::os::raw::c_uint; } extern "C" { pub fn bn_zero(x: *mut bignum256); } extern "C" { pub fn bn_one(x: *mut bignum256); } extern "C" { pub fn bn_is_zero(x: *const bignum256) -> ::std::os::raw::c_int; } extern "C" { pub fn bn_is_one(x: *const bignum256) -> ::std::os::raw::c_int; } extern "C" { pub fn bn_is_less(x: *const bignum256, y: *const bignum256) -> ::std::os::raw::c_int; } extern "C" { pub fn bn_is_equal(x: *const bignum256, y: *const bignum256) -> ::std::os::raw::c_int; } extern "C" { pub fn bn_cmov( res: *mut bignum256, cond: u32, truecase: *const bignum256, falsecase: *const bignum256, ); } extern "C" { pub fn bn_cnegate(cond: u32, x: *mut bignum256, prime: *const bignum256); } extern "C" { pub fn bn_lshift(x: *mut bignum256); } extern "C" { pub fn bn_rshift(x: *mut bignum256); } extern "C" { pub fn bn_setbit(x: *mut bignum256, i: u16); } extern "C" { pub fn bn_clearbit(x: *mut bignum256, i: u16); } extern "C" { pub fn bn_testbit(x: *const bignum256, i: u16) -> u32; } extern "C" { pub fn bn_xor(res: *mut bignum256, x: *const bignum256, y: *const bignum256); } extern "C" { pub fn bn_mult_half(x: *mut bignum256, prime: *const bignum256); } extern "C" { pub fn bn_mult_k(x: *mut bignum256, k: u8, prime: *const bignum256); } extern "C" { pub fn bn_mod(x: *mut bignum256, prime: *const bignum256); } extern "C" { pub fn bn_multiply(k: *const bignum256, x: *mut bignum256, prime: *const bignum256); } extern "C" { pub fn bn_fast_mod(x: *mut bignum256, prime: *const bignum256); } extern "C" { pub fn bn_power_mod( x: *const bignum256, e: *const bignum256, prime: *const bignum256, res: *mut bignum256, ); } extern "C" { pub fn bn_sqrt(x: *mut bignum256, prime: *const bignum256); } extern "C" { pub fn inverse_mod_power_two(a: u32, n: u32) -> u32; } extern "C" { pub fn bn_divide_base(x: *mut bignum256, prime: *const bignum256); } extern "C" { pub fn bn_normalize(x: *mut bignum256); } extern "C" { pub fn bn_add(x: *mut bignum256, y: *const bignum256); } extern "C" { pub fn bn_addmod(x: *mut bignum256, y: *const bignum256, prime: *const bignum256); } extern "C" { pub fn bn_addi(x: *mut bignum256, y: u32); } extern "C" { pub fn bn_subi(x: *mut bignum256, y: u32, prime: *const bignum256); } extern "C" { pub fn bn_subtractmod( x: *const bignum256, y: *const bignum256, res: *mut bignum256, prime: *const bignum256, ); } extern "C" { pub fn bn_subtract(x: *const bignum256, y: *const bignum256, res: *mut bignum256); } extern "C" { pub fn bn_long_division(x: *mut bignum256, d: u32, q: *mut bignum256, r: *mut u32); } extern "C" { pub fn bn_divmod58(x: *mut bignum256, r: *mut u32); } extern "C" { pub fn bn_divmod1000(x: *mut bignum256, r: *mut u32); } extern "C" { pub fn bn_inverse(x: *mut bignum256, prime: *const bignum256); } extern "C" { pub fn bn_format( amount: *const bignum256, prefix: *const ::std::os::raw::c_char, suffix: *const ::std::os::raw::c_char, decimals: ::std::os::raw::c_uint, exponent: ::std::os::raw::c_int, trailing: bool, output: *mut ::std::os::raw::c_char, output_length: size_t, ) -> size_t; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct BLAKE256_CTX { pub h: [u32; 8usize], pub s: [u32; 4usize], pub t: [u32; 2usize], pub buflen: size_t, pub nullt: u8, pub buf: [u8; 64usize], } #[test] fn bindgen_test_layout_BLAKE256_CTX() { assert_eq!( ::std::mem::size_of::(), 136usize, concat!("Size of: ", stringify!(BLAKE256_CTX)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(BLAKE256_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).h as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(BLAKE256_CTX), "::", stringify!(h) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(BLAKE256_CTX), "::", stringify!(s) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).t as *const _ as usize }, 48usize, concat!( "Offset of field: ", stringify!(BLAKE256_CTX), "::", stringify!(t) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).buflen as *const _ as usize }, 56usize, concat!( "Offset of field: ", stringify!(BLAKE256_CTX), "::", stringify!(buflen) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).nullt as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(BLAKE256_CTX), "::", stringify!(nullt) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).buf as *const _ as usize }, 65usize, concat!( "Offset of field: ", stringify!(BLAKE256_CTX), "::", stringify!(buf) ) ); } extern "C" { pub fn blake256_Init(arg1: *mut BLAKE256_CTX); } extern "C" { pub fn blake256_Update(arg1: *mut BLAKE256_CTX, arg2: *const u8, arg3: size_t); } extern "C" { pub fn blake256_Final(arg1: *mut BLAKE256_CTX, arg2: *mut u8); } extern "C" { pub fn blake256(arg1: *const u8, arg2: size_t, arg3: *mut u8); } pub const blake2b_constant_BLAKE2B_BLOCKBYTES: blake2b_constant = 128; pub const blake2b_constant_BLAKE2B_OUTBYTES: blake2b_constant = 64; pub const blake2b_constant_BLAKE2B_KEYBYTES: blake2b_constant = 64; pub const blake2b_constant_BLAKE2B_SALTBYTES: blake2b_constant = 16; pub const blake2b_constant_BLAKE2B_PERSONALBYTES: blake2b_constant = 16; pub type blake2b_constant = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __blake2b_state { pub h: [u64; 8usize], pub t: [u64; 2usize], pub f: [u64; 2usize], pub buf: [u8; 128usize], pub buflen: size_t, pub outlen: size_t, pub last_node: u8, } #[test] fn bindgen_test_layout___blake2b_state() { assert_eq!( ::std::mem::size_of::<__blake2b_state>(), 248usize, concat!("Size of: ", stringify!(__blake2b_state)) ); assert_eq!( ::std::mem::align_of::<__blake2b_state>(), 8usize, concat!("Alignment of ", stringify!(__blake2b_state)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2b_state>())).h as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__blake2b_state), "::", stringify!(h) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2b_state>())).t as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(__blake2b_state), "::", stringify!(t) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2b_state>())).f as *const _ as usize }, 80usize, concat!( "Offset of field: ", stringify!(__blake2b_state), "::", stringify!(f) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2b_state>())).buf as *const _ as usize }, 96usize, concat!( "Offset of field: ", stringify!(__blake2b_state), "::", stringify!(buf) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2b_state>())).buflen as *const _ as usize }, 224usize, concat!( "Offset of field: ", stringify!(__blake2b_state), "::", stringify!(buflen) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2b_state>())).outlen as *const _ as usize }, 232usize, concat!( "Offset of field: ", stringify!(__blake2b_state), "::", stringify!(outlen) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2b_state>())).last_node as *const _ as usize }, 240usize, concat!( "Offset of field: ", stringify!(__blake2b_state), "::", stringify!(last_node) ) ); } pub type blake2b_state = __blake2b_state; extern "C" { pub fn blake2b_Init(S: *mut blake2b_state, outlen: size_t) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2b_InitKey( S: *mut blake2b_state, outlen: size_t, key: *const ::std::os::raw::c_void, keylen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2b_InitPersonal( S: *mut blake2b_state, outlen: size_t, personal: *const ::std::os::raw::c_void, personal_len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2b_Update( S: *mut blake2b_state, pin: *const ::std::os::raw::c_void, inlen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2b_Final( S: *mut blake2b_state, out: *mut ::std::os::raw::c_void, outlen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2b( msg: *const u8, msg_len: u32, out: *mut ::std::os::raw::c_void, outlen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2b_Key( msg: *const u8, msg_len: u32, key: *const ::std::os::raw::c_void, keylen: size_t, out: *mut ::std::os::raw::c_void, outlen: size_t, ) -> ::std::os::raw::c_int; } #[doc = " This structure is a context for Groestl-384 and Groestl-512 computations:"] #[doc = " it contains the intermediate values and some data from the last"] #[doc = " entered block. Once a Groestl computation has been performed, the"] #[doc = " context can be reused for another computation."] #[doc = ""] #[doc = " The contents of this structure are private. A running Groestl"] #[doc = " computation can be cloned by copying the context (e.g. with a simple"] #[doc = " memcpy())."] #[repr(C)] #[derive(Copy, Clone)] pub struct sph_groestl_big_context { pub buf: [::std::os::raw::c_uchar; 128usize], pub ptr: size_t, pub state: sph_groestl_big_context__bindgen_ty_1, pub count: u64, } #[repr(C)] #[derive(Copy, Clone)] pub union sph_groestl_big_context__bindgen_ty_1 { pub wide: [u64; 16usize], pub narrow: [u32; 32usize], } #[test] fn bindgen_test_layout_sph_groestl_big_context__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 128usize, concat!( "Size of: ", stringify!(sph_groestl_big_context__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(sph_groestl_big_context__bindgen_ty_1) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).wide as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(sph_groestl_big_context__bindgen_ty_1), "::", stringify!(wide) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).narrow as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(sph_groestl_big_context__bindgen_ty_1), "::", stringify!(narrow) ) ); } #[test] fn bindgen_test_layout_sph_groestl_big_context() { assert_eq!( ::std::mem::size_of::(), 272usize, concat!("Size of: ", stringify!(sph_groestl_big_context)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(sph_groestl_big_context)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).buf as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(sph_groestl_big_context), "::", stringify!(buf) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).ptr as *const _ as usize }, 128usize, concat!( "Offset of field: ", stringify!(sph_groestl_big_context), "::", stringify!(ptr) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, 136usize, concat!( "Offset of field: ", stringify!(sph_groestl_big_context), "::", stringify!(state) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, 264usize, concat!( "Offset of field: ", stringify!(sph_groestl_big_context), "::", stringify!(count) ) ); } pub type GROESTL512_CTX = sph_groestl_big_context; extern "C" { #[doc = " Initialize a Groestl-512 context. This process performs no memory allocation."] #[doc = ""] #[doc = " @param cc the Groestl-512 context (pointer to a"] #[doc = " GROESTL512_CTX)"] pub fn groestl512_Init(cc: *mut ::std::os::raw::c_void); } extern "C" { #[doc = " Process some data bytes. It is acceptable that len is zero"] #[doc = " (in which case this function does nothing)."] #[doc = ""] #[doc = " @param cc the Groestl-512 context"] #[doc = " @param data the input data"] #[doc = " @param len the input data length (in bytes)"] pub fn groestl512_Update( cc: *mut ::std::os::raw::c_void, data: *const ::std::os::raw::c_void, len: size_t, ); } extern "C" { #[doc = " Terminate the current Groestl-512 computation and output the result into"] #[doc = " the provided buffer. The destination buffer must be wide enough to"] #[doc = " accomodate the result (64 bytes). The context is automatically"] #[doc = " reinitialized."] #[doc = ""] #[doc = " @param cc the Groestl-512 context"] #[doc = " @param dst the destination buffer"] pub fn groestl512_Final(cc: *mut ::std::os::raw::c_void, dst: *mut ::std::os::raw::c_void); } extern "C" { pub fn groestl512_DoubleTrunc( cc: *mut ::std::os::raw::c_void, dst: *mut ::std::os::raw::c_void, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _SHA1_CTX { pub state: [u32; 5usize], pub bitcount: u64, pub buffer: [u32; 16usize], } #[test] fn bindgen_test_layout__SHA1_CTX() { assert_eq!( ::std::mem::size_of::<_SHA1_CTX>(), 96usize, concat!("Size of: ", stringify!(_SHA1_CTX)) ); assert_eq!( ::std::mem::align_of::<_SHA1_CTX>(), 8usize, concat!("Alignment of ", stringify!(_SHA1_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA1_CTX>())).state as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SHA1_CTX), "::", stringify!(state) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA1_CTX>())).bitcount as *const _ as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SHA1_CTX), "::", stringify!(bitcount) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA1_CTX>())).buffer as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SHA1_CTX), "::", stringify!(buffer) ) ); } pub type SHA1_CTX = _SHA1_CTX; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _SHA256_CTX { pub state: [u32; 8usize], pub bitcount: u64, pub buffer: [u32; 16usize], } #[test] fn bindgen_test_layout__SHA256_CTX() { assert_eq!( ::std::mem::size_of::<_SHA256_CTX>(), 104usize, concat!("Size of: ", stringify!(_SHA256_CTX)) ); assert_eq!( ::std::mem::align_of::<_SHA256_CTX>(), 8usize, concat!("Alignment of ", stringify!(_SHA256_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA256_CTX>())).state as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SHA256_CTX), "::", stringify!(state) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA256_CTX>())).bitcount as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SHA256_CTX), "::", stringify!(bitcount) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA256_CTX>())).buffer as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(_SHA256_CTX), "::", stringify!(buffer) ) ); } pub type SHA256_CTX = _SHA256_CTX; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _SHA512_CTX { pub state: [u64; 8usize], pub bitcount: [u64; 2usize], pub buffer: [u64; 16usize], } #[test] fn bindgen_test_layout__SHA512_CTX() { assert_eq!( ::std::mem::size_of::<_SHA512_CTX>(), 208usize, concat!("Size of: ", stringify!(_SHA512_CTX)) ); assert_eq!( ::std::mem::align_of::<_SHA512_CTX>(), 8usize, concat!("Alignment of ", stringify!(_SHA512_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA512_CTX>())).state as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SHA512_CTX), "::", stringify!(state) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA512_CTX>())).bitcount as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SHA512_CTX), "::", stringify!(bitcount) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_SHA512_CTX>())).buffer as *const _ as usize }, 80usize, concat!( "Offset of field: ", stringify!(_SHA512_CTX), "::", stringify!(buffer) ) ); } pub type SHA512_CTX = _SHA512_CTX; extern "C" { pub static sha256_initial_hash_value: [u32; 8usize]; } extern "C" { pub static sha512_initial_hash_value: [u64; 8usize]; } extern "C" { pub fn sha1_Transform(state_in: *const u32, data: *const u32, state_out: *mut u32); } extern "C" { pub fn sha1_Init(arg1: *mut SHA1_CTX); } extern "C" { pub fn sha1_Update(arg1: *mut SHA1_CTX, arg2: *const u8, arg3: size_t); } extern "C" { pub fn sha1_Final(arg1: *mut SHA1_CTX, arg2: *mut u8); } extern "C" { pub fn sha1_End( arg1: *mut SHA1_CTX, arg2: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn sha1_Raw(arg1: *const u8, arg2: size_t, arg3: *mut u8); } extern "C" { pub fn sha1_Data( arg1: *const u8, arg2: size_t, arg3: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn sha256_Transform(state_in: *const u32, data: *const u32, state_out: *mut u32); } extern "C" { pub fn sha256_Init(arg1: *mut SHA256_CTX); } extern "C" { pub fn sha256_Update(arg1: *mut SHA256_CTX, arg2: *const u8, arg3: size_t); } extern "C" { pub fn sha256_Final(arg1: *mut SHA256_CTX, arg2: *mut u8); } extern "C" { pub fn sha256_End( arg1: *mut SHA256_CTX, arg2: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn sha256_Raw(arg1: *const u8, arg2: size_t, arg3: *mut u8); } extern "C" { pub fn sha256_Data( arg1: *const u8, arg2: size_t, arg3: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn sha512_Transform(state_in: *const u64, data: *const u64, state_out: *mut u64); } extern "C" { pub fn sha512_Init(arg1: *mut SHA512_CTX); } extern "C" { pub fn sha512_Update(arg1: *mut SHA512_CTX, arg2: *const u8, arg3: size_t); } extern "C" { pub fn sha512_Final(arg1: *mut SHA512_CTX, arg2: *mut u8); } extern "C" { pub fn sha512_End( arg1: *mut SHA512_CTX, arg2: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn sha512_Raw(arg1: *const u8, arg2: size_t, arg3: *mut u8); } extern "C" { pub fn sha512_Data( arg1: *const u8, arg2: size_t, arg3: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } pub const HasherType_HASHER_SHA2: HasherType = 0; pub const HasherType_HASHER_SHA2D: HasherType = 1; pub const HasherType_HASHER_SHA2_RIPEMD: HasherType = 2; pub const HasherType_HASHER_SHA3: HasherType = 3; pub const HasherType_HASHER_SHA3K: HasherType = 4; pub const HasherType_HASHER_BLAKE: HasherType = 5; pub const HasherType_HASHER_BLAKED: HasherType = 6; pub const HasherType_HASHER_BLAKE_RIPEMD: HasherType = 7; pub const HasherType_HASHER_GROESTLD_TRUNC: HasherType = 8; pub const HasherType_HASHER_BLAKE2B: HasherType = 9; pub const HasherType_HASHER_BLAKE2B_PERSONAL: HasherType = 10; pub type HasherType = ::std::os::raw::c_uint; #[repr(C)] #[derive(Copy, Clone)] pub struct Hasher { pub type_: HasherType, pub ctx: Hasher__bindgen_ty_1, pub param: *const ::std::os::raw::c_void, pub param_size: u32, } #[repr(C)] #[derive(Copy, Clone)] pub union Hasher__bindgen_ty_1 { pub sha2: SHA256_CTX, pub sha3: SHA3_CTX, pub blake: BLAKE256_CTX, pub groestl: GROESTL512_CTX, pub blake2b: blake2b_state, } #[test] fn bindgen_test_layout_Hasher__bindgen_ty_1() { assert_eq!( ::std::mem::size_of::(), 400usize, concat!("Size of: ", stringify!(Hasher__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(Hasher__bindgen_ty_1)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).sha2 as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(Hasher__bindgen_ty_1), "::", stringify!(sha2) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).sha3 as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(Hasher__bindgen_ty_1), "::", stringify!(sha3) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).blake as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(Hasher__bindgen_ty_1), "::", stringify!(blake) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).groestl as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(Hasher__bindgen_ty_1), "::", stringify!(groestl) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).blake2b as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(Hasher__bindgen_ty_1), "::", stringify!(blake2b) ) ); } #[test] fn bindgen_test_layout_Hasher() { assert_eq!( ::std::mem::size_of::(), 424usize, concat!("Size of: ", stringify!(Hasher)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(Hasher)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(Hasher), "::", stringify!(type_) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).ctx as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(Hasher), "::", stringify!(ctx) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).param as *const _ as usize }, 408usize, concat!( "Offset of field: ", stringify!(Hasher), "::", stringify!(param) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).param_size as *const _ as usize }, 416usize, concat!( "Offset of field: ", stringify!(Hasher), "::", stringify!(param_size) ) ); } extern "C" { pub fn hasher_InitParam( hasher: *mut Hasher, type_: HasherType, param: *const ::std::os::raw::c_void, param_size: u32, ); } extern "C" { pub fn hasher_Init(hasher: *mut Hasher, type_: HasherType); } extern "C" { pub fn hasher_Reset(hasher: *mut Hasher); } extern "C" { pub fn hasher_Update(hasher: *mut Hasher, data: *const u8, length: size_t); } extern "C" { pub fn hasher_Final(hasher: *mut Hasher, hash: *mut u8); } extern "C" { pub fn hasher_Raw(type_: HasherType, data: *const u8, length: size_t, hash: *mut u8); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct curve_point { pub x: bignum256, pub y: bignum256, } #[test] fn bindgen_test_layout_curve_point() { assert_eq!( ::std::mem::size_of::(), 72usize, concat!("Size of: ", stringify!(curve_point)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(curve_point)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(curve_point), "::", stringify!(x) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, 36usize, concat!( "Offset of field: ", stringify!(curve_point), "::", stringify!(y) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ecdsa_curve { pub prime: bignum256, pub G: curve_point, pub order: bignum256, pub order_half: bignum256, pub a: ::std::os::raw::c_int, pub b: bignum256, pub cp: [[curve_point; 8usize]; 64usize], } #[test] fn bindgen_test_layout_ecdsa_curve() { assert_eq!( ::std::mem::size_of::(), 37084usize, concat!("Size of: ", stringify!(ecdsa_curve)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(ecdsa_curve)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).prime as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(ecdsa_curve), "::", stringify!(prime) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).G as *const _ as usize }, 36usize, concat!( "Offset of field: ", stringify!(ecdsa_curve), "::", stringify!(G) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).order as *const _ as usize }, 108usize, concat!( "Offset of field: ", stringify!(ecdsa_curve), "::", stringify!(order) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).order_half as *const _ as usize }, 144usize, concat!( "Offset of field: ", stringify!(ecdsa_curve), "::", stringify!(order_half) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, 180usize, concat!( "Offset of field: ", stringify!(ecdsa_curve), "::", stringify!(a) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, 184usize, concat!( "Offset of field: ", stringify!(ecdsa_curve), "::", stringify!(b) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).cp as *const _ as usize }, 220usize, concat!( "Offset of field: ", stringify!(ecdsa_curve), "::", stringify!(cp) ) ); } extern "C" { pub fn point_copy(cp1: *const curve_point, cp2: *mut curve_point); } extern "C" { pub fn point_add(curve: *const ecdsa_curve, cp1: *const curve_point, cp2: *mut curve_point); } extern "C" { pub fn point_double(curve: *const ecdsa_curve, cp: *mut curve_point); } extern "C" { pub fn point_multiply( curve: *const ecdsa_curve, k: *const bignum256, p: *const curve_point, res: *mut curve_point, ); } extern "C" { pub fn point_set_infinity(p: *mut curve_point); } extern "C" { pub fn point_is_infinity(p: *const curve_point) -> ::std::os::raw::c_int; } extern "C" { pub fn point_is_equal(p: *const curve_point, q: *const curve_point) -> ::std::os::raw::c_int; } extern "C" { pub fn point_is_negative_of( p: *const curve_point, q: *const curve_point, ) -> ::std::os::raw::c_int; } extern "C" { pub fn scalar_multiply(curve: *const ecdsa_curve, k: *const bignum256, res: *mut curve_point); } extern "C" { pub fn ecdh_multiply( curve: *const ecdsa_curve, priv_key: *const u8, pub_key: *const u8, session_key: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn compress_coords(cp: *const curve_point, compressed: *mut u8); } extern "C" { pub fn uncompress_coords( curve: *const ecdsa_curve, odd: u8, x: *const bignum256, y: *mut bignum256, ); } extern "C" { pub fn ecdsa_uncompress_pubkey( curve: *const ecdsa_curve, pub_key: *const u8, uncompressed: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_sign( curve: *const ecdsa_curve, hasher_sign: HasherType, priv_key: *const u8, msg: *const u8, msg_len: u32, sig: *mut u8, pby: *mut u8, is_canonical: ::std::option::Option< unsafe extern "C" fn(by: u8, sig: *mut u8) -> ::std::os::raw::c_int, >, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_sign_digest( curve: *const ecdsa_curve, priv_key: *const u8, digest: *const u8, sig: *mut u8, pby: *mut u8, is_canonical: ::std::option::Option< unsafe extern "C" fn(by: u8, sig: *mut u8) -> ::std::os::raw::c_int, >, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_get_public_key33(curve: *const ecdsa_curve, priv_key: *const u8, pub_key: *mut u8); } extern "C" { pub fn ecdsa_get_public_key65(curve: *const ecdsa_curve, priv_key: *const u8, pub_key: *mut u8); } extern "C" { pub fn ecdsa_get_pubkeyhash(pub_key: *const u8, hasher_pubkey: HasherType, pubkeyhash: *mut u8); } extern "C" { pub fn ecdsa_get_address_raw( pub_key: *const u8, version: u32, hasher_pubkey: HasherType, addr_raw: *mut u8, ); } extern "C" { pub fn ecdsa_get_address( pub_key: *const u8, version: u32, hasher_pubkey: HasherType, hasher_base58: HasherType, addr: *mut ::std::os::raw::c_char, addrsize: ::std::os::raw::c_int, ); } extern "C" { pub fn ecdsa_get_address_segwit_p2sh_raw( pub_key: *const u8, version: u32, hasher_pubkey: HasherType, addr_raw: *mut u8, ); } extern "C" { pub fn ecdsa_get_address_segwit_p2sh( pub_key: *const u8, version: u32, hasher_pubkey: HasherType, hasher_base58: HasherType, addr: *mut ::std::os::raw::c_char, addrsize: ::std::os::raw::c_int, ); } extern "C" { pub fn ecdsa_get_wif( priv_key: *const u8, version: u32, hasher_base58: HasherType, wif: *mut ::std::os::raw::c_char, wifsize: ::std::os::raw::c_int, ); } extern "C" { pub fn ecdsa_address_decode( addr: *const ::std::os::raw::c_char, version: u32, hasher_base58: HasherType, out: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_read_pubkey( curve: *const ecdsa_curve, pub_key: *const u8, pub_: *mut curve_point, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_validate_pubkey( curve: *const ecdsa_curve, pub_: *const curve_point, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_verify( curve: *const ecdsa_curve, hasher_sign: HasherType, pub_key: *const u8, sig: *const u8, msg: *const u8, msg_len: u32, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_verify_digest( curve: *const ecdsa_curve, pub_key: *const u8, sig: *const u8, digest: *const u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_recover_pub_from_sig( curve: *const ecdsa_curve, pub_key: *mut u8, sig: *const u8, digest: *const u8, recid: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_sig_to_der(sig: *const u8, der: *mut u8) -> ::std::os::raw::c_int; } extern "C" { pub fn ecdsa_sig_from_der( der: *const u8, der_len: size_t, sig: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub static mut SECP256K1_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut SECP256K1_DECRED_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut SECP256K1_GROESTL_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut SECP256K1_SMART_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut NIST256P1_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut ED25519_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut ED25519_CARDANO_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut ED25519_SHA3_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut ED25519_KECCAK_NAME: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut CURVE25519_NAME: [::std::os::raw::c_char; 0usize]; } pub type ed25519_signature = [::std::os::raw::c_uchar; 64usize]; pub type ed25519_public_key = [::std::os::raw::c_uchar; 32usize]; pub type ed25519_secret_key = [::std::os::raw::c_uchar; 32usize]; pub type curve25519_key = [::std::os::raw::c_uchar; 32usize]; pub type ed25519_cosi_signature = [::std::os::raw::c_uchar; 32usize]; extern "C" { pub fn ed25519_publickey(sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar); } extern "C" { pub fn ed25519_publickey_ext( sk: *mut ::std::os::raw::c_uchar, skext: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_sign_open( m: *const ::std::os::raw::c_uchar, mlen: size_t, pk: *mut ::std::os::raw::c_uchar, RS: *mut ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ed25519_sign( m: *const ::std::os::raw::c_uchar, mlen: size_t, sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, RS: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_sign_ext( m: *const ::std::os::raw::c_uchar, mlen: size_t, sk: *mut ::std::os::raw::c_uchar, skext: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, RS: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_scalarmult( res: *mut ::std::os::raw::c_uchar, sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn curve25519_scalarmult( mypublic: *mut ::std::os::raw::c_uchar, secret: *mut ::std::os::raw::c_uchar, basepoint: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn curve25519_scalarmult_basepoint( mypublic: *mut ::std::os::raw::c_uchar, secret: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_cosi_combine_publickeys( res: *mut ::std::os::raw::c_uchar, pks: *mut ed25519_public_key, n: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ed25519_cosi_combine_signatures( res: *mut ::std::os::raw::c_uchar, R: *mut ::std::os::raw::c_uchar, sigs: *mut ed25519_cosi_signature, n: size_t, ); } extern "C" { pub fn ed25519_cosi_sign( m: *const ::std::os::raw::c_uchar, mlen: size_t, key: *mut ::std::os::raw::c_uchar, nonce: *mut ::std::os::raw::c_uchar, R: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, sig: *mut ::std::os::raw::c_uchar, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct curve_info { pub bip32_name: *const ::std::os::raw::c_char, pub params: *const ecdsa_curve, pub hasher_base58: HasherType, pub hasher_sign: HasherType, pub hasher_pubkey: HasherType, pub hasher_script: HasherType, } #[test] fn bindgen_test_layout_curve_info() { assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(curve_info)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(curve_info)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).bip32_name as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(curve_info), "::", stringify!(bip32_name) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).params as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(curve_info), "::", stringify!(params) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).hasher_base58 as *const _ as usize }, 16usize, concat!( "Offset of field: ", stringify!(curve_info), "::", stringify!(hasher_base58) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).hasher_sign as *const _ as usize }, 20usize, concat!( "Offset of field: ", stringify!(curve_info), "::", stringify!(hasher_sign) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).hasher_pubkey as *const _ as usize }, 24usize, concat!( "Offset of field: ", stringify!(curve_info), "::", stringify!(hasher_pubkey) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).hasher_script as *const _ as usize }, 28usize, concat!( "Offset of field: ", stringify!(curve_info), "::", stringify!(hasher_script) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct HDNode { pub depth: u32, pub child_num: u32, pub chain_code: [u8; 32usize], pub private_key: [u8; 32usize], pub private_key_extension: [u8; 32usize], pub public_key: [u8; 33usize], pub curve: *const curve_info, } #[test] fn bindgen_test_layout_HDNode() { assert_eq!( ::std::mem::size_of::(), 152usize, concat!("Size of: ", stringify!(HDNode)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(HDNode)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(HDNode), "::", stringify!(depth) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).child_num as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(HDNode), "::", stringify!(child_num) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).chain_code as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(HDNode), "::", stringify!(chain_code) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).private_key as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(HDNode), "::", stringify!(private_key) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).private_key_extension as *const _ as usize }, 72usize, concat!( "Offset of field: ", stringify!(HDNode), "::", stringify!(private_key_extension) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).public_key as *const _ as usize }, 104usize, concat!( "Offset of field: ", stringify!(HDNode), "::", stringify!(public_key) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).curve as *const _ as usize }, 144usize, concat!( "Offset of field: ", stringify!(HDNode), "::", stringify!(curve) ) ); } extern "C" { pub fn hdnode_from_xpub( depth: u32, child_num: u32, chain_code: *const u8, public_key: *const u8, curve: *const ::std::os::raw::c_char, out: *mut HDNode, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_from_xprv( depth: u32, child_num: u32, chain_code: *const u8, private_key: *const u8, curve: *const ::std::os::raw::c_char, out: *mut HDNode, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_from_seed( seed: *const u8, seed_len: ::std::os::raw::c_int, curve: *const ::std::os::raw::c_char, out: *mut HDNode, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_private_ckd(inout: *mut HDNode, i: u32) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_private_ckd_cardano(inout: *mut HDNode, i: u32) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_from_seed_cardano( seed: *const u8, seed_len: ::std::os::raw::c_int, out: *mut HDNode, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_from_entropy_cardano_icarus( pass: *const u8, pass_len: ::std::os::raw::c_int, seed: *const u8, seed_len: ::std::os::raw::c_int, out: *mut HDNode, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_public_ckd_cp( curve: *const ecdsa_curve, parent: *const curve_point, parent_chain_code: *const u8, i: u32, child: *mut curve_point, child_chain_code: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_public_ckd(inout: *mut HDNode, i: u32) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_public_ckd_address_optimized( pub_: *const curve_point, chain_code: *const u8, i: u32, version: u32, hasher_pubkey: HasherType, hasher_base58: HasherType, addr: *mut ::std::os::raw::c_char, addrsize: ::std::os::raw::c_int, addrformat: ::std::os::raw::c_int, ); } extern "C" { pub fn hdnode_private_ckd_cached( inout: *mut HDNode, i: *const u32, i_count: size_t, fingerprint: *mut u32, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_fingerprint(node: *mut HDNode) -> u32; } extern "C" { pub fn hdnode_fill_public_key(node: *mut HDNode); } extern "C" { pub fn hdnode_get_ethereum_pubkeyhash( node: *const HDNode, pubkeyhash: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_get_nem_address( node: *mut HDNode, version: u8, address: *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_get_nem_shared_key( node: *const HDNode, peer_public_key: *mut ::std::os::raw::c_uchar, salt: *const u8, mul: *mut ::std::os::raw::c_uchar, shared_key: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_nem_encrypt( node: *const HDNode, public_key: *mut ::std::os::raw::c_uchar, iv: *const u8, salt: *const u8, payload: *const u8, size: size_t, buffer: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_nem_decrypt( node: *const HDNode, public_key: *mut ::std::os::raw::c_uchar, iv: *mut u8, salt: *const u8, payload: *const u8, size: size_t, buffer: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_sign( node: *mut HDNode, msg: *const u8, msg_len: u32, hasher_sign: HasherType, sig: *mut u8, pby: *mut u8, is_canonical: ::std::option::Option< unsafe extern "C" fn(by: u8, sig: *mut u8) -> ::std::os::raw::c_int, >, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_sign_digest( node: *mut HDNode, digest: *const u8, sig: *mut u8, pby: *mut u8, is_canonical: ::std::option::Option< unsafe extern "C" fn(by: u8, sig: *mut u8) -> ::std::os::raw::c_int, >, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_get_shared_key( node: *const HDNode, peer_public_key: *const u8, session_key: *mut u8, result_size: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_serialize_public( node: *const HDNode, fingerprint: u32, version: u32, str_: *mut ::std::os::raw::c_char, strsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_serialize_private( node: *const HDNode, fingerprint: u32, version: u32, str_: *mut ::std::os::raw::c_char, strsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_deserialize_public( str_: *const ::std::os::raw::c_char, version: u32, curve: *const ::std::os::raw::c_char, node: *mut HDNode, fingerprint: *mut u32, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_deserialize_private( str_: *const ::std::os::raw::c_char, version: u32, curve: *const ::std::os::raw::c_char, node: *mut HDNode, fingerprint: *mut u32, ) -> ::std::os::raw::c_int; } extern "C" { pub fn hdnode_get_address_raw(node: *mut HDNode, version: u32, addr_raw: *mut u8); } extern "C" { pub fn hdnode_get_address( node: *mut HDNode, version: u32, addr: *mut ::std::os::raw::c_char, addrsize: ::std::os::raw::c_int, ); } extern "C" { pub fn get_curve_by_name(curve_name: *const ::std::os::raw::c_char) -> *const curve_info; } extern "C" { pub static secp256k1: ecdsa_curve; } extern "C" { pub static secp256k1_info: curve_info; } extern "C" { pub static secp256k1_decred_info: curve_info; } extern "C" { pub static secp256k1_groestl_info: curve_info; } extern "C" { pub static secp256k1_smart_info: curve_info; } extern "C" { pub static nist256p1: ecdsa_curve; } extern "C" { pub static nist256p1_info: curve_info; } extern "C" { pub fn random_reseed(value: u32); } extern "C" { pub fn random32() -> u32; } extern "C" { pub fn random_buffer(buf: *mut u8, len: size_t); } extern "C" { pub fn random_uniform(n: u32) -> u32; } extern "C" { pub fn random_permute(buf: *mut ::std::os::raw::c_char, len: size_t); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _HMAC_SHA256_CTX { pub o_key_pad: [u8; 64usize], pub ctx: SHA256_CTX, } #[test] fn bindgen_test_layout__HMAC_SHA256_CTX() { assert_eq!( ::std::mem::size_of::<_HMAC_SHA256_CTX>(), 168usize, concat!("Size of: ", stringify!(_HMAC_SHA256_CTX)) ); assert_eq!( ::std::mem::align_of::<_HMAC_SHA256_CTX>(), 8usize, concat!("Alignment of ", stringify!(_HMAC_SHA256_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_HMAC_SHA256_CTX>())).o_key_pad as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_HMAC_SHA256_CTX), "::", stringify!(o_key_pad) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_HMAC_SHA256_CTX>())).ctx as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(_HMAC_SHA256_CTX), "::", stringify!(ctx) ) ); } pub type HMAC_SHA256_CTX = _HMAC_SHA256_CTX; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _HMAC_SHA512_CTX { pub o_key_pad: [u8; 128usize], pub ctx: SHA512_CTX, } #[test] fn bindgen_test_layout__HMAC_SHA512_CTX() { assert_eq!( ::std::mem::size_of::<_HMAC_SHA512_CTX>(), 336usize, concat!("Size of: ", stringify!(_HMAC_SHA512_CTX)) ); assert_eq!( ::std::mem::align_of::<_HMAC_SHA512_CTX>(), 8usize, concat!("Alignment of ", stringify!(_HMAC_SHA512_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_HMAC_SHA512_CTX>())).o_key_pad as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_HMAC_SHA512_CTX), "::", stringify!(o_key_pad) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_HMAC_SHA512_CTX>())).ctx as *const _ as usize }, 128usize, concat!( "Offset of field: ", stringify!(_HMAC_SHA512_CTX), "::", stringify!(ctx) ) ); } pub type HMAC_SHA512_CTX = _HMAC_SHA512_CTX; extern "C" { pub fn hmac_sha256_Init(hctx: *mut HMAC_SHA256_CTX, key: *const u8, keylen: u32); } extern "C" { pub fn hmac_sha256_Update(hctx: *mut HMAC_SHA256_CTX, msg: *const u8, msglen: u32); } extern "C" { pub fn hmac_sha256_Final(hctx: *mut HMAC_SHA256_CTX, hmac: *mut u8); } extern "C" { pub fn hmac_sha256(key: *const u8, keylen: u32, msg: *const u8, msglen: u32, hmac: *mut u8); } extern "C" { pub fn hmac_sha256_prepare( key: *const u8, keylen: u32, opad_digest: *mut u32, ipad_digest: *mut u32, ); } extern "C" { pub fn hmac_sha512_Init(hctx: *mut HMAC_SHA512_CTX, key: *const u8, keylen: u32); } extern "C" { pub fn hmac_sha512_Update(hctx: *mut HMAC_SHA512_CTX, msg: *const u8, msglen: u32); } extern "C" { pub fn hmac_sha512_Final(hctx: *mut HMAC_SHA512_CTX, hmac: *mut u8); } extern "C" { pub fn hmac_sha512(key: *const u8, keylen: u32, msg: *const u8, msglen: u32, hmac: *mut u8); } extern "C" { pub fn hmac_sha512_prepare( key: *const u8, keylen: u32, opad_digest: *mut u64, ipad_digest: *mut u64, ); } extern "C" { pub fn mnemonic_generate(strength: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mnemonic_from_data( data: *const u8, len: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mnemonic_clear(); } extern "C" { pub fn mnemonic_check(mnemonic: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mnemonic_to_bits( mnemonic: *const ::std::os::raw::c_char, bits: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn mnemonic_to_seed( mnemonic: *const ::std::os::raw::c_char, passphrase: *const ::std::os::raw::c_char, seed: *mut u8, progress_callback: ::std::option::Option, ); } extern "C" { pub fn mnemonic_find_word(word: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mnemonic_complete_word( prefix: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mnemonic_get_word(index: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mnemonic_word_completion_mask( prefix: *const ::std::os::raw::c_char, len: ::std::os::raw::c_int, ) -> u32; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _PBKDF2_HMAC_SHA256_CTX { pub odig: [u32; 8usize], pub idig: [u32; 8usize], pub f: [u32; 8usize], pub g: [u32; 16usize], pub first: ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__PBKDF2_HMAC_SHA256_CTX() { assert_eq!( ::std::mem::size_of::<_PBKDF2_HMAC_SHA256_CTX>(), 164usize, concat!("Size of: ", stringify!(_PBKDF2_HMAC_SHA256_CTX)) ); assert_eq!( ::std::mem::align_of::<_PBKDF2_HMAC_SHA256_CTX>(), 4usize, concat!("Alignment of ", stringify!(_PBKDF2_HMAC_SHA256_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA256_CTX>())).odig as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA256_CTX), "::", stringify!(odig) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA256_CTX>())).idig as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA256_CTX), "::", stringify!(idig) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA256_CTX>())).f as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA256_CTX), "::", stringify!(f) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA256_CTX>())).g as *const _ as usize }, 96usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA256_CTX), "::", stringify!(g) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA256_CTX>())).first as *const _ as usize }, 160usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA256_CTX), "::", stringify!(first) ) ); } pub type PBKDF2_HMAC_SHA256_CTX = _PBKDF2_HMAC_SHA256_CTX; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _PBKDF2_HMAC_SHA512_CTX { pub odig: [u64; 8usize], pub idig: [u64; 8usize], pub f: [u64; 8usize], pub g: [u64; 16usize], pub first: ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__PBKDF2_HMAC_SHA512_CTX() { assert_eq!( ::std::mem::size_of::<_PBKDF2_HMAC_SHA512_CTX>(), 328usize, concat!("Size of: ", stringify!(_PBKDF2_HMAC_SHA512_CTX)) ); assert_eq!( ::std::mem::align_of::<_PBKDF2_HMAC_SHA512_CTX>(), 8usize, concat!("Alignment of ", stringify!(_PBKDF2_HMAC_SHA512_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA512_CTX>())).odig as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA512_CTX), "::", stringify!(odig) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA512_CTX>())).idig as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA512_CTX), "::", stringify!(idig) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA512_CTX>())).f as *const _ as usize }, 128usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA512_CTX), "::", stringify!(f) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA512_CTX>())).g as *const _ as usize }, 192usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA512_CTX), "::", stringify!(g) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_PBKDF2_HMAC_SHA512_CTX>())).first as *const _ as usize }, 320usize, concat!( "Offset of field: ", stringify!(_PBKDF2_HMAC_SHA512_CTX), "::", stringify!(first) ) ); } pub type PBKDF2_HMAC_SHA512_CTX = _PBKDF2_HMAC_SHA512_CTX; extern "C" { pub fn pbkdf2_hmac_sha256_Init( pctx: *mut PBKDF2_HMAC_SHA256_CTX, pass: *const u8, passlen: ::std::os::raw::c_int, salt: *const u8, saltlen: ::std::os::raw::c_int, blocknr: u32, ); } extern "C" { pub fn pbkdf2_hmac_sha256_Update(pctx: *mut PBKDF2_HMAC_SHA256_CTX, iterations: u32); } extern "C" { pub fn pbkdf2_hmac_sha256_Final(pctx: *mut PBKDF2_HMAC_SHA256_CTX, key: *mut u8); } extern "C" { pub fn pbkdf2_hmac_sha256( pass: *const u8, passlen: ::std::os::raw::c_int, salt: *const u8, saltlen: ::std::os::raw::c_int, iterations: u32, key: *mut u8, keylen: ::std::os::raw::c_int, ); } extern "C" { pub fn pbkdf2_hmac_sha512_Init( pctx: *mut PBKDF2_HMAC_SHA512_CTX, pass: *const u8, passlen: ::std::os::raw::c_int, salt: *const u8, saltlen: ::std::os::raw::c_int, blocknr: u32, ); } extern "C" { pub fn pbkdf2_hmac_sha512_Update(pctx: *mut PBKDF2_HMAC_SHA512_CTX, iterations: u32); } extern "C" { pub fn pbkdf2_hmac_sha512_Final(pctx: *mut PBKDF2_HMAC_SHA512_CTX, key: *mut u8); } extern "C" { pub fn pbkdf2_hmac_sha512( pass: *const u8, passlen: ::std::os::raw::c_int, salt: *const u8, saltlen: ::std::os::raw::c_int, iterations: u32, key: *mut u8, keylen: ::std::os::raw::c_int, ); } extern "C" { pub static mut b58digits_ordered: [::std::os::raw::c_char; 0usize]; } extern "C" { pub static mut b58digits_map: [i8; 0usize]; } extern "C" { pub fn base58_encode_check( data: *const u8, len: ::std::os::raw::c_int, hasher_type: HasherType, str_: *mut ::std::os::raw::c_char, strsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn base58_decode_check( str_: *const ::std::os::raw::c_char, hasher_type: HasherType, data: *mut u8, datalen: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn b58tobin( bin: *mut ::std::os::raw::c_void, binszp: *mut size_t, b58: *const ::std::os::raw::c_char, ) -> bool; } extern "C" { pub fn b58check( bin: *const ::std::os::raw::c_void, binsz: size_t, hasher_type: HasherType, base58str: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn b58enc( b58: *mut ::std::os::raw::c_char, b58sz: *mut size_t, data: *const ::std::os::raw::c_void, binsz: size_t, ) -> bool; } extern "C" { pub fn base58gph_encode_check( data: *const u8, datalen: ::std::os::raw::c_int, str_: *mut ::std::os::raw::c_char, strsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn base58gph_decode_check( str_: *const ::std::os::raw::c_char, data: *mut u8, datalen: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn b58gphcheck( bin: *const ::std::os::raw::c_void, binsz: size_t, base58str: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub static mut BASE32_ALPHABET_RFC4648: *const ::std::os::raw::c_char; } extern "C" { pub fn base32_encode( in_: *const u8, inlen: size_t, out: *mut ::std::os::raw::c_char, outlen: size_t, alphabet: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn base32_encode_unsafe(in_: *const u8, inlen: size_t, out: *mut u8); } extern "C" { pub fn base32_decode( in_: *const ::std::os::raw::c_char, inlen: size_t, out: *mut u8, outlen: size_t, alphabet: *const ::std::os::raw::c_char, ) -> *mut u8; } extern "C" { pub fn base32_decode_unsafe( in_: *const u8, inlen: size_t, out: *mut u8, alphabet: *const ::std::os::raw::c_char, ) -> bool; } extern "C" { pub fn base32_encoded_length(inlen: size_t) -> size_t; } extern "C" { pub fn base32_decoded_length(inlen: size_t) -> size_t; } extern "C" { pub fn address_prefix_bytes_len(address_type: u32) -> size_t; } extern "C" { pub fn address_write_prefix_bytes(address_type: u32, out: *mut u8); } extern "C" { pub fn address_check_prefix(addr: *const u8, address_type: u32) -> bool; } extern "C" { pub fn ethereum_address_checksum( addr: *const u8, address: *mut ::std::os::raw::c_char, rskip60: bool, chain_id: u32, ); } extern "C" { pub fn script_output_to_address( script: *const u8, scriptlen: ::std::os::raw::c_int, addr: *mut ::std::os::raw::c_char, addrsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _RIPEMD160_CTX { #[doc = "< number of bytes processed"] pub total: [u32; 2usize], #[doc = "< intermediate digest state"] pub state: [u32; 5usize], #[doc = "< data block being processed"] pub buffer: [u8; 64usize], } #[test] fn bindgen_test_layout__RIPEMD160_CTX() { assert_eq!( ::std::mem::size_of::<_RIPEMD160_CTX>(), 92usize, concat!("Size of: ", stringify!(_RIPEMD160_CTX)) ); assert_eq!( ::std::mem::align_of::<_RIPEMD160_CTX>(), 4usize, concat!("Alignment of ", stringify!(_RIPEMD160_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_RIPEMD160_CTX>())).total as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_RIPEMD160_CTX), "::", stringify!(total) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_RIPEMD160_CTX>())).state as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(_RIPEMD160_CTX), "::", stringify!(state) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_RIPEMD160_CTX>())).buffer as *const _ as usize }, 28usize, concat!( "Offset of field: ", stringify!(_RIPEMD160_CTX), "::", stringify!(buffer) ) ); } pub type RIPEMD160_CTX = _RIPEMD160_CTX; extern "C" { pub fn ripemd160_Init(ctx: *mut RIPEMD160_CTX); } extern "C" { pub fn ripemd160_Update(ctx: *mut RIPEMD160_CTX, input: *const u8, ilen: u32); } extern "C" { pub fn ripemd160_Final(ctx: *mut RIPEMD160_CTX, output: *mut u8); } extern "C" { pub fn ripemd160(msg: *const u8, msg_len: u32, hash: *mut u8); } extern "C" { pub fn curve25519_scalarmult_donna( mypublic: *mut ::std::os::raw::c_uchar, n: *mut ::std::os::raw::c_uchar, basepoint: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_publickey_sha3( sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_sign_open_sha3( m: *const ::std::os::raw::c_uchar, mlen: size_t, pk: *mut ::std::os::raw::c_uchar, RS: *mut ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ed25519_sign_sha3( m: *const ::std::os::raw::c_uchar, mlen: size_t, sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, RS: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_scalarmult_sha3( res: *mut ::std::os::raw::c_uchar, sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ed25519_publickey_keccak( sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_sign_open_keccak( m: *const ::std::os::raw::c_uchar, mlen: size_t, pk: *mut ::std::os::raw::c_uchar, RS: *mut ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn ed25519_sign_keccak( m: *const ::std::os::raw::c_uchar, mlen: size_t, sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, RS: *mut ::std::os::raw::c_uchar, ); } extern "C" { pub fn ed25519_scalarmult_keccak( res: *mut ::std::os::raw::c_uchar, sk: *mut ::std::os::raw::c_uchar, pk: *mut ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn xmr_base58_addr_encode_check( tag: u64, data: *const u8, binsz: size_t, b58: *mut ::std::os::raw::c_char, b58sz: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn xmr_base58_addr_decode_check( addr: *const ::std::os::raw::c_char, sz: size_t, tag: *mut u64, data: *mut ::std::os::raw::c_void, datalen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn xmr_base58_encode( b58: *mut ::std::os::raw::c_char, b58sz: *mut size_t, data: *const ::std::os::raw::c_void, binsz: size_t, ) -> bool; } extern "C" { pub fn xmr_base58_decode( b58: *const ::std::os::raw::c_char, b58sz: size_t, data: *mut ::std::os::raw::c_void, binsz: *mut size_t, ) -> bool; } extern "C" { pub fn xmr_size_varint(num: u64) -> ::std::os::raw::c_int; } extern "C" { pub fn xmr_write_varint(buff: *mut u8, buff_size: size_t, num: u64) -> ::std::os::raw::c_int; } extern "C" { pub fn xmr_read_varint( buff: *mut u8, buff_size: size_t, val: *mut u64, ) -> ::std::os::raw::c_int; } extern "C" { pub static xmr_h: ge25519; } pub type xmr_key_t = [::std::os::raw::c_uchar; 32usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct xmr_ctkey { pub dest: xmr_key_t, pub mask: xmr_key_t, } #[test] fn bindgen_test_layout_xmr_ctkey() { assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(xmr_ctkey)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(xmr_ctkey)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).dest as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(xmr_ctkey), "::", stringify!(dest) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).mask as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(xmr_ctkey), "::", stringify!(mask) ) ); } pub type xmr_ctkey_t = xmr_ctkey; extern "C" { pub fn ge25519_set_xmr_h(r: *mut ge25519); } extern "C" { pub fn xmr_random_scalar(m: *mut bignum256modm_element_t); } extern "C" { pub fn xmr_fast_hash(hash: *mut u8, data: *const ::std::os::raw::c_void, length: size_t); } extern "C" { pub fn xmr_hasher_init(hasher: *mut Hasher); } extern "C" { pub fn xmr_hasher_update( hasher: *mut Hasher, data: *const ::std::os::raw::c_void, length: size_t, ); } extern "C" { pub fn xmr_hasher_final(hasher: *mut Hasher, hash: *mut u8); } extern "C" { pub fn xmr_hasher_copy(dst: *mut Hasher, src: *const Hasher); } extern "C" { pub fn xmr_hash_to_scalar( r: *mut bignum256modm_element_t, data: *const ::std::os::raw::c_void, length: size_t, ); } extern "C" { pub fn xmr_hash_to_ec(P: *mut ge25519, data: *const ::std::os::raw::c_void, length: size_t); } extern "C" { pub fn xmr_derivation_to_scalar( s: *mut bignum256modm_element_t, p: *const ge25519, output_index: u32, ); } extern "C" { pub fn xmr_generate_key_derivation( r: *mut ge25519, A: *const ge25519, b: *mut bignum256modm_element_t, ); } extern "C" { pub fn xmr_derive_private_key( s: *mut bignum256modm_element_t, deriv: *const ge25519, idx: u32, base: *mut bignum256modm_element_t, ); } extern "C" { pub fn xmr_derive_public_key( r: *mut ge25519, deriv: *const ge25519, idx: u32, base: *const ge25519, ); } extern "C" { pub fn xmr_add_keys2( r: *mut ge25519, a: *mut bignum256modm_element_t, b: *mut bignum256modm_element_t, B: *const ge25519, ); } extern "C" { pub fn xmr_add_keys2_vartime( r: *mut ge25519, a: *mut bignum256modm_element_t, b: *mut bignum256modm_element_t, B: *const ge25519, ); } extern "C" { pub fn xmr_add_keys3( r: *mut ge25519, a: *mut bignum256modm_element_t, A: *const ge25519, b: *mut bignum256modm_element_t, B: *const ge25519, ); } extern "C" { pub fn xmr_add_keys3_vartime( r: *mut ge25519, a: *mut bignum256modm_element_t, A: *const ge25519, b: *mut bignum256modm_element_t, B: *const ge25519, ); } extern "C" { pub fn xmr_get_subaddress_secret_key( r: *mut bignum256modm_element_t, major: u32, minor: u32, m: *mut bignum256modm_element_t, ); } extern "C" { pub fn xmr_gen_c(r: *mut ge25519, a: *mut bignum256modm_element_t, amount: u64); } pub type xmr_amount = u64; pub type xmr_key64_t = [xmr_key_t; 64usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct xmr_boro_sig { pub s0: xmr_key64_t, pub s1: xmr_key64_t, pub ee: xmr_key_t, } #[test] fn bindgen_test_layout_xmr_boro_sig() { assert_eq!( ::std::mem::size_of::(), 4128usize, concat!("Size of: ", stringify!(xmr_boro_sig)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(xmr_boro_sig)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).s0 as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(xmr_boro_sig), "::", stringify!(s0) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).s1 as *const _ as usize }, 2048usize, concat!( "Offset of field: ", stringify!(xmr_boro_sig), "::", stringify!(s1) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).ee as *const _ as usize }, 4096usize, concat!( "Offset of field: ", stringify!(xmr_boro_sig), "::", stringify!(ee) ) ); } pub type xmr_boro_sig_t = xmr_boro_sig; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct range_sig { pub asig: xmr_boro_sig_t, pub Ci: xmr_key64_t, } #[test] fn bindgen_test_layout_range_sig() { assert_eq!( ::std::mem::size_of::(), 6176usize, concat!("Size of: ", stringify!(range_sig)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(range_sig)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).asig as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(range_sig), "::", stringify!(asig) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).Ci as *const _ as usize }, 4128usize, concat!( "Offset of field: ", stringify!(range_sig), "::", stringify!(Ci) ) ); } pub type xmr_range_sig_t = range_sig; extern "C" { pub fn xmr_gen_range_sig( sig: *mut xmr_range_sig_t, C: *mut ge25519, mask: *mut bignum256modm_element_t, amount: xmr_amount, last_mask: *mut bignum256modm, ); } extern "C" { pub fn xmr_gen_range_sig_ex( sig: *mut xmr_range_sig_t, C: *mut ge25519, mask: *mut bignum256modm_element_t, amount: xmr_amount, last_mask: *mut bignum256modm, ai: *mut bignum256modm, alpha: *mut bignum256modm, ); } pub const blake2s_constant_BLAKE2S_BLOCKBYTES: blake2s_constant = 64; pub const blake2s_constant_BLAKE2S_OUTBYTES: blake2s_constant = 32; pub const blake2s_constant_BLAKE2S_KEYBYTES: blake2s_constant = 32; pub const blake2s_constant_BLAKE2S_SALTBYTES: blake2s_constant = 8; pub const blake2s_constant_BLAKE2S_PERSONALBYTES: blake2s_constant = 8; pub type blake2s_constant = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __blake2s_state { pub h: [u32; 8usize], pub t: [u32; 2usize], pub f: [u32; 2usize], pub buf: [u8; 64usize], pub buflen: u32, pub outlen: u8, pub last_node: u8, } #[test] fn bindgen_test_layout___blake2s_state() { assert_eq!( ::std::mem::size_of::<__blake2s_state>(), 120usize, concat!("Size of: ", stringify!(__blake2s_state)) ); assert_eq!( ::std::mem::align_of::<__blake2s_state>(), 4usize, concat!("Alignment of ", stringify!(__blake2s_state)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2s_state>())).h as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(__blake2s_state), "::", stringify!(h) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2s_state>())).t as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(__blake2s_state), "::", stringify!(t) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2s_state>())).f as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(__blake2s_state), "::", stringify!(f) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2s_state>())).buf as *const _ as usize }, 48usize, concat!( "Offset of field: ", stringify!(__blake2s_state), "::", stringify!(buf) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2s_state>())).buflen as *const _ as usize }, 112usize, concat!( "Offset of field: ", stringify!(__blake2s_state), "::", stringify!(buflen) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2s_state>())).outlen as *const _ as usize }, 116usize, concat!( "Offset of field: ", stringify!(__blake2s_state), "::", stringify!(outlen) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<__blake2s_state>())).last_node as *const _ as usize }, 117usize, concat!( "Offset of field: ", stringify!(__blake2s_state), "::", stringify!(last_node) ) ); } pub type blake2s_state = __blake2s_state; extern "C" { pub fn blake2s_Init(S: *mut blake2s_state, outlen: size_t) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2s_InitKey( S: *mut blake2s_state, outlen: size_t, key: *const ::std::os::raw::c_void, keylen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2s_InitPersonal( S: *mut blake2s_state, outlen: size_t, personal: *const ::std::os::raw::c_void, personal_len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2s_Update( S: *mut blake2s_state, pin: *const ::std::os::raw::c_void, inlen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2s_Final( S: *mut blake2s_state, out: *mut ::std::os::raw::c_void, outlen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2s( msg: *const u8, msg_len: u32, out: *mut ::std::os::raw::c_void, outlen: size_t, ) -> ::std::os::raw::c_int; } extern "C" { pub fn blake2s_Key( msg: *const u8, msg_len: u32, key: *const ::std::os::raw::c_void, keylen: size_t, out: *mut ::std::os::raw::c_void, outlen: size_t, ) -> ::std::os::raw::c_int; } pub type __m64 = [::std::os::raw::c_longlong; 1usize]; pub type __v1di = [::std::os::raw::c_longlong; 1usize]; pub type __v2si = [::std::os::raw::c_int; 2usize]; pub type __v4hi = [::std::os::raw::c_short; 4usize]; pub type __v8qi = [::std::os::raw::c_char; 8usize]; pub type __v4si = [::std::os::raw::c_int; 4usize]; pub type __v4sf = [f32; 4usize]; pub type __m128 = [f32; 4usize]; pub type __m128_u = [f32; 4usize]; pub type __v4su = [::std::os::raw::c_uint; 4usize]; extern "C" { pub fn _mm_sfence(); } extern "C" { pub fn _mm_getcsr() -> ::std::os::raw::c_uint; } extern "C" { pub fn _mm_setcsr(__i: ::std::os::raw::c_uint); } pub type __m128d = [f64; 2usize]; pub type __m128i = [::std::os::raw::c_longlong; 2usize]; pub type __m128d_u = [f64; 2usize]; pub type __m128i_u = [::std::os::raw::c_longlong; 2usize]; pub type __v2df = [f64; 2usize]; pub type __v2di = [::std::os::raw::c_longlong; 2usize]; pub type __v8hi = [::std::os::raw::c_short; 8usize]; pub type __v16qi = [::std::os::raw::c_char; 16usize]; pub type __v2du = [::std::os::raw::c_ulonglong; 2usize]; pub type __v8hu = [::std::os::raw::c_ushort; 8usize]; pub type __v16qu = [::std::os::raw::c_uchar; 16usize]; pub type __v16qs = [::std::os::raw::c_schar; 16usize]; extern "C" { pub fn _mm_clflush(__p: *const ::std::os::raw::c_void); } extern "C" { pub fn _mm_lfence(); } extern "C" { pub fn _mm_mfence(); } extern "C" { pub fn _mm_pause(); } pub type s8 = ::std::os::raw::c_schar; pub type u8_ = ::std::os::raw::c_uchar; pub type s16 = ::std::os::raw::c_short; pub type u16_ = ::std::os::raw::c_ushort; pub type s32 = ::std::os::raw::c_int; pub type u32_ = ::std::os::raw::c_uint; pub type s64 = ::std::os::raw::c_long; pub type u64_ = ::std::os::raw::c_ulong; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ECRYPT_ctx { pub input: [u32_; 16usize], } #[test] fn bindgen_test_layout_ECRYPT_ctx() { assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(ECRYPT_ctx)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(ECRYPT_ctx)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).input as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(ECRYPT_ctx), "::", stringify!(input) ) ); } extern "C" { pub fn ECRYPT_init(); } extern "C" { pub fn ECRYPT_keysetup(ctx: *mut ECRYPT_ctx, key: *const u8_, keysize: u32_, ivsize: u32_); } extern "C" { pub fn ECRYPT_ivsetup(ctx: *mut ECRYPT_ctx, iv: *const u8_); } extern "C" { pub fn ECRYPT_ctrsetup(ctx: *mut ECRYPT_ctx, ctr: *const u8_); } extern "C" { pub fn ECRYPT_encrypt_bytes( ctx: *mut ECRYPT_ctx, plaintext: *const u8_, ciphertext: *mut u8_, msglen: u32_, ); } extern "C" { pub fn ECRYPT_decrypt_bytes( ctx: *mut ECRYPT_ctx, ciphertext: *const u8_, plaintext: *mut u8_, msglen: u32_, ); } extern "C" { pub fn ECRYPT_keystream_bytes(ctx: *mut ECRYPT_ctx, keystream: *mut u8_, length: u32_); } extern "C" { pub fn ECRYPT_encrypt_packet( ctx: *mut ECRYPT_ctx, iv: *const u8_, plaintext: *const u8_, ciphertext: *mut u8_, msglen: u32_, ); } extern "C" { pub fn ECRYPT_decrypt_packet( ctx: *mut ECRYPT_ctx, iv: *const u8_, ciphertext: *const u8_, plaintext: *mut u8_, msglen: u32_, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct poly1305_context { pub aligner: size_t, pub opaque: [::std::os::raw::c_uchar; 136usize], } #[test] fn bindgen_test_layout_poly1305_context() { assert_eq!( ::std::mem::size_of::(), 144usize, concat!("Size of: ", stringify!(poly1305_context)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(poly1305_context)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).aligner as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(poly1305_context), "::", stringify!(aligner) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).opaque as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(poly1305_context), "::", stringify!(opaque) ) ); } extern "C" { pub fn poly1305_init(ctx: *mut poly1305_context, key: *const ::std::os::raw::c_uchar); } extern "C" { pub fn poly1305_update( ctx: *mut poly1305_context, m: *const ::std::os::raw::c_uchar, bytes: size_t, ); } extern "C" { pub fn poly1305_finish(ctx: *mut poly1305_context, mac: *mut ::std::os::raw::c_uchar); } extern "C" { pub fn poly1305_auth( mac: *mut ::std::os::raw::c_uchar, m: *const ::std::os::raw::c_uchar, bytes: size_t, key: *const ::std::os::raw::c_uchar, ); } extern "C" { pub fn poly1305_verify( mac1: *const ::std::os::raw::c_uchar, mac2: *const ::std::os::raw::c_uchar, ) -> ::std::os::raw::c_int; } extern "C" { pub fn poly1305_power_on_self_test() -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct chacha20poly1305_ctx { pub chacha20: ECRYPT_ctx, pub poly1305: poly1305_context, } #[test] fn bindgen_test_layout_chacha20poly1305_ctx() { assert_eq!( ::std::mem::size_of::(), 208usize, concat!("Size of: ", stringify!(chacha20poly1305_ctx)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(chacha20poly1305_ctx)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).chacha20 as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(chacha20poly1305_ctx), "::", stringify!(chacha20) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).poly1305 as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(chacha20poly1305_ctx), "::", stringify!(poly1305) ) ); } extern "C" { pub fn xchacha20poly1305_init(ctx: *mut chacha20poly1305_ctx, key: *const u8, nonce: *const u8); } extern "C" { pub fn chacha20poly1305_encrypt( ctx: *mut chacha20poly1305_ctx, in_: *const u8, out: *mut u8, n: size_t, ); } extern "C" { pub fn chacha20poly1305_decrypt( ctx: *mut chacha20poly1305_ctx, in_: *const u8, out: *mut u8, n: size_t, ); } extern "C" { pub fn chacha20poly1305_auth(ctx: *mut chacha20poly1305_ctx, in_: *const u8, n: size_t); } extern "C" { pub fn chacha20poly1305_finish(ctx: *mut chacha20poly1305_ctx, mac: *mut u8); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _CHACHA_DRBG_CTX { pub chacha_ctx: ECRYPT_ctx, pub reseed_counter: u32, } #[test] fn bindgen_test_layout__CHACHA_DRBG_CTX() { assert_eq!( ::std::mem::size_of::<_CHACHA_DRBG_CTX>(), 68usize, concat!("Size of: ", stringify!(_CHACHA_DRBG_CTX)) ); assert_eq!( ::std::mem::align_of::<_CHACHA_DRBG_CTX>(), 4usize, concat!("Alignment of ", stringify!(_CHACHA_DRBG_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_CHACHA_DRBG_CTX>())).chacha_ctx as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_CHACHA_DRBG_CTX), "::", stringify!(chacha_ctx) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_CHACHA_DRBG_CTX>())).reseed_counter as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(_CHACHA_DRBG_CTX), "::", stringify!(reseed_counter) ) ); } pub type CHACHA_DRBG_CTX = _CHACHA_DRBG_CTX; extern "C" { pub fn chacha_drbg_init( ctx: *mut CHACHA_DRBG_CTX, entropy: *const u8, entropy_length: size_t, nonce: *const u8, nonce_length: size_t, ); } extern "C" { pub fn chacha_drbg_generate(ctx: *mut CHACHA_DRBG_CTX, output: *mut u8, output_length: size_t); } extern "C" { pub fn chacha_drbg_reseed( ctx: *mut CHACHA_DRBG_CTX, entropy: *const u8, entropy_length: size_t, additional_input: *const u8, additional_input_length: size_t, ); } extern "C" { pub fn rfc7539_init(ctx: *mut chacha20poly1305_ctx, key: *const u8, nonce: *const u8); } extern "C" { pub fn rfc7539_auth(ctx: *mut chacha20poly1305_ctx, in_: *const u8, n: size_t); } extern "C" { pub fn rfc7539_finish(ctx: *mut chacha20poly1305_ctx, alen: i64, plen: i64, mac: *mut u8); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct RC4_CTX { pub S: [u8; 256usize], pub i: u8, pub j: u8, } #[test] fn bindgen_test_layout_RC4_CTX() { assert_eq!( ::std::mem::size_of::(), 258usize, concat!("Size of: ", stringify!(RC4_CTX)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(RC4_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).S as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(RC4_CTX), "::", stringify!(S) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, 256usize, concat!( "Offset of field: ", stringify!(RC4_CTX), "::", stringify!(i) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).j as *const _ as usize }, 257usize, concat!( "Offset of field: ", stringify!(RC4_CTX), "::", stringify!(j) ) ); } extern "C" { pub fn rc4_init(ctx: *mut RC4_CTX, key: *const u8, length: size_t); } extern "C" { pub fn rc4_encrypt(ctx: *mut RC4_CTX, buffer: *mut u8, length: size_t); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nem_transaction_ctx { pub public_key: ed25519_public_key, pub buffer: *mut u8, pub offset: size_t, pub size: size_t, } #[test] fn bindgen_test_layout_nem_transaction_ctx() { assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(nem_transaction_ctx)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(nem_transaction_ctx)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).public_key as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(nem_transaction_ctx), "::", stringify!(public_key) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(nem_transaction_ctx), "::", stringify!(buffer) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).offset as *const _ as usize }, 40usize, concat!( "Offset of field: ", stringify!(nem_transaction_ctx), "::", stringify!(offset) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, 48usize, concat!( "Offset of field: ", stringify!(nem_transaction_ctx), "::", stringify!(size) ) ); } extern "C" { pub fn nem_network_name(network: u8) -> *const ::std::os::raw::c_char; } extern "C" { pub fn nem_get_address_raw( public_key: *mut ::std::os::raw::c_uchar, version: u8, address: *mut u8, ); } extern "C" { pub fn nem_get_address( public_key: *mut ::std::os::raw::c_uchar, version: u8, address: *mut ::std::os::raw::c_char, ) -> bool; } extern "C" { pub fn nem_validate_address_raw(address: *const u8, network: u8) -> bool; } extern "C" { pub fn nem_validate_address(address: *const ::std::os::raw::c_char, network: u8) -> bool; } extern "C" { pub fn nem_transaction_start( ctx: *mut nem_transaction_ctx, public_key: *mut ::std::os::raw::c_uchar, buffer: *mut u8, size: size_t, ); } extern "C" { pub fn nem_transaction_end( ctx: *mut nem_transaction_ctx, private_key: *mut ::std::os::raw::c_uchar, signature: *mut ::std::os::raw::c_uchar, ) -> size_t; } extern "C" { pub fn nem_transaction_write_common( context: *mut nem_transaction_ctx, type_: u32, version: u32, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, ) -> bool; } extern "C" { pub fn nem_transaction_create_transfer( context: *mut nem_transaction_ctx, network: u8, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, recipient: *const ::std::os::raw::c_char, amount: u64, payload: *const u8, length: u32, encrypted: bool, mosaics: u32, ) -> bool; } extern "C" { pub fn nem_transaction_write_mosaic( ctx: *mut nem_transaction_ctx, namespace: *const ::std::os::raw::c_char, mosaic: *const ::std::os::raw::c_char, quantity: u64, ) -> bool; } extern "C" { pub fn nem_transaction_create_multisig( ctx: *mut nem_transaction_ctx, network: u8, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, inner: *const nem_transaction_ctx, ) -> bool; } extern "C" { pub fn nem_transaction_create_multisig_signature( ctx: *mut nem_transaction_ctx, network: u8, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, inner: *const nem_transaction_ctx, ) -> bool; } extern "C" { pub fn nem_transaction_create_provision_namespace( ctx: *mut nem_transaction_ctx, network: u8, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, namespace: *const ::std::os::raw::c_char, parent: *const ::std::os::raw::c_char, rental_sink: *const ::std::os::raw::c_char, rental_fee: u64, ) -> bool; } extern "C" { pub fn nem_transaction_create_mosaic_creation( ctx: *mut nem_transaction_ctx, network: u8, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, namespace: *const ::std::os::raw::c_char, mosaic: *const ::std::os::raw::c_char, description: *const ::std::os::raw::c_char, divisibility: u32, supply: u64, mutable_supply: bool, transferable: bool, levy_type: u32, levy_fee: u64, levy_address: *const ::std::os::raw::c_char, levy_namespace: *const ::std::os::raw::c_char, levy_mosaic: *const ::std::os::raw::c_char, creation_sink: *const ::std::os::raw::c_char, creation_fee: u64, ) -> bool; } extern "C" { pub fn nem_transaction_create_mosaic_supply_change( ctx: *mut nem_transaction_ctx, network: u8, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, namespace: *const ::std::os::raw::c_char, mosaic: *const ::std::os::raw::c_char, type_: u32, delta: u64, ) -> bool; } extern "C" { pub fn nem_transaction_create_aggregate_modification( ctx: *mut nem_transaction_ctx, network: u8, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, modifications: u32, relative_change: bool, ) -> bool; } extern "C" { pub fn nem_transaction_write_cosignatory_modification( ctx: *mut nem_transaction_ctx, type_: u32, cosignatory: *mut ::std::os::raw::c_uchar, ) -> bool; } extern "C" { pub fn nem_transaction_write_minimum_cosignatories( ctx: *mut nem_transaction_ctx, relative_change: i32, ) -> bool; } extern "C" { pub fn nem_transaction_create_importance_transfer( ctx: *mut nem_transaction_ctx, network: u8, timestamp: u32, signer: *mut ::std::os::raw::c_uchar, fee: u64, deadline: u32, mode: u32, remote: *mut ::std::os::raw::c_uchar, ) -> bool; } extern "C" { #[doc = " Encode a SegWit address"] #[doc = ""] #[doc = " Out: output: Pointer to a buffer of size 73 + strlen(hrp) that will be"] #[doc = " updated to contain the null-terminated address."] #[doc = " In: hrp: Pointer to the null-terminated human readable part to use"] #[doc = " (chain/network specific)."] #[doc = " ver: Version of the witness program (between 0 and 16 inclusive)."] #[doc = " prog: Data bytes for the witness program (between 2 and 40 bytes)."] #[doc = " prog_len: Number of data bytes in prog."] #[doc = " Returns 1 if successful."] pub fn segwit_addr_encode( output: *mut ::std::os::raw::c_char, hrp: *const ::std::os::raw::c_char, ver: ::std::os::raw::c_int, prog: *const u8, prog_len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { #[doc = " Decode a SegWit address"] #[doc = ""] #[doc = " Out: ver: Pointer to an int that will be updated to contain the witness"] #[doc = " program version (between 0 and 16 inclusive)."] #[doc = " prog: Pointer to a buffer of size 40 that will be updated to"] #[doc = " contain the witness program bytes."] #[doc = " prog_len: Pointer to a size_t that will be updated to contain the"] #[doc = " length of bytes in prog. hrp: Pointer to the null-terminated human"] #[doc = " readable part that is expected (chain/network specific). addr: Pointer to"] #[doc = " the null-terminated address. Returns 1 if successful."] pub fn segwit_addr_decode( ver: *mut ::std::os::raw::c_int, prog: *mut u8, prog_len: *mut size_t, hrp: *const ::std::os::raw::c_char, addr: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { #[doc = " Encode a Bech32 string"] #[doc = ""] #[doc = " Out: output: Pointer to a buffer of size strlen(hrp) + data_len + 8 that"] #[doc = " will be updated to contain the null-terminated Bech32 string."] #[doc = " In: hrp : Pointer to the null-terminated human readable part."] #[doc = " data : Pointer to an array of 5-bit values."] #[doc = " data_len: Length of the data array."] #[doc = " Returns 1 if successful."] pub fn bech32_encode( output: *mut ::std::os::raw::c_char, hrp: *const ::std::os::raw::c_char, data: *const u8, data_len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { #[doc = " Decode a Bech32 string"] #[doc = ""] #[doc = " Out: hrp: Pointer to a buffer of size strlen(input) - 6. Will be"] #[doc = " updated to contain the null-terminated human readable part."] #[doc = " data: Pointer to a buffer of size strlen(input) - 8 that will"] #[doc = " hold the encoded 5-bit data values."] #[doc = " data_len: Pointer to a size_t that will be updated to be the number"] #[doc = " of entries in data."] #[doc = " In: input: Pointer to a null-terminated Bech32 string."] #[doc = " Returns 1 if succesful."] pub fn bech32_decode( hrp: *mut ::std::os::raw::c_char, data: *mut u8, data_len: *mut size_t, input: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { #[doc = " Encode a Cashaddr address"] #[doc = ""] #[doc = " Out: output: Pointer to a buffer of size 105 + strlen(hrp) that will be"] #[doc = " updated to contain the null-terminated address."] #[doc = " In: hrp: Pointer to the null-terminated human readable part to use"] #[doc = " (chain/network specific)."] #[doc = " prog: Data bytes for the hash (between 21 and 65 bytes)."] #[doc = " prog_len: Number of data bytes in prog."] #[doc = " Returns 1 if successful."] pub fn cash_addr_encode( output: *mut ::std::os::raw::c_char, hrp: *const ::std::os::raw::c_char, prog: *const u8, prog_len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { #[doc = " Decode a CashAddr address"] #[doc = ""] #[doc = " Out: prog: Pointer to a buffer of size 65 that will be updated to"] #[doc = " contain the witness program bytes."] #[doc = " prog_len: Pointer to a size_t that will be updated to contain the"] #[doc = " length of bytes in prog. hrp: Pointer to the null-terminated human"] #[doc = " readable part that is expected (chain/network specific). addr: Pointer to"] #[doc = " the null-terminated address. Returns 1 if successful."] pub fn cash_addr_decode( prog: *mut u8, prog_len: *mut size_t, hrp: *const ::std::os::raw::c_char, addr: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { #[doc = " Encode a Cash string"] #[doc = ""] #[doc = " Out: output: Pointer to a buffer of size strlen(hrp) + data_len + 8 that"] #[doc = " will be updated to contain the null-terminated Cash string."] #[doc = " In: hrp : Pointer to the null-terminated human readable part."] #[doc = " data : Pointer to an array of 5-bit values."] #[doc = " data_len: Length of the data array."] #[doc = " Returns 1 if successful."] pub fn cash_encode( output: *mut ::std::os::raw::c_char, hrp: *const ::std::os::raw::c_char, data: *const u8, data_len: size_t, ) -> ::std::os::raw::c_int; } extern "C" { #[doc = " Decode a Cash string"] #[doc = ""] #[doc = " Out: hrp: Pointer to a buffer of size strlen(input) - 6. Will be"] #[doc = " updated to contain the null-terminated human readable part."] #[doc = " data: Pointer to a buffer of size strlen(input) - 8 that will"] #[doc = " hold the encoded 5-bit data values."] #[doc = " data_len: Pointer to a size_t that will be updated to be the number"] #[doc = " of entries in data."] #[doc = " In: input: Pointer to a null-terminated Cash string."] #[doc = " Returns 1 if succesful."] pub fn cash_decode( hrp: *mut ::std::os::raw::c_char, data: *mut u8, data_len: *mut size_t, input: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn memzero(pnt: *mut ::std::os::raw::c_void, len: size_t); } extern "C" { pub fn shamir_interpolate( result: *mut u8, result_index: u8, share_indices: *const u8, share_values: *mut *const u8, share_count: u8, len: size_t, ) -> bool; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _HMAC_DRBG_CTX { pub odig: [u32; 8usize], pub idig: [u32; 8usize], pub v: [u32; 16usize], } #[test] fn bindgen_test_layout__HMAC_DRBG_CTX() { assert_eq!( ::std::mem::size_of::<_HMAC_DRBG_CTX>(), 128usize, concat!("Size of: ", stringify!(_HMAC_DRBG_CTX)) ); assert_eq!( ::std::mem::align_of::<_HMAC_DRBG_CTX>(), 4usize, concat!("Alignment of ", stringify!(_HMAC_DRBG_CTX)) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_HMAC_DRBG_CTX>())).odig as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(_HMAC_DRBG_CTX), "::", stringify!(odig) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_HMAC_DRBG_CTX>())).idig as *const _ as usize }, 32usize, concat!( "Offset of field: ", stringify!(_HMAC_DRBG_CTX), "::", stringify!(idig) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::<_HMAC_DRBG_CTX>())).v as *const _ as usize }, 64usize, concat!( "Offset of field: ", stringify!(_HMAC_DRBG_CTX), "::", stringify!(v) ) ); } pub type HMAC_DRBG_CTX = _HMAC_DRBG_CTX; extern "C" { pub fn hmac_drbg_init( ctx: *mut HMAC_DRBG_CTX, buf: *const u8, len: size_t, nonce: *const u8, nonce_len: size_t, ); } extern "C" { pub fn hmac_drbg_reseed( ctx: *mut HMAC_DRBG_CTX, buf: *const u8, len: size_t, addin: *const u8, addin_len: size_t, ); } extern "C" { pub fn hmac_drbg_generate(ctx: *mut HMAC_DRBG_CTX, buf: *mut u8, len: size_t); } pub type rfc6979_state = HMAC_DRBG_CTX; extern "C" { pub fn init_rfc6979(priv_key: *const u8, hash: *const u8, rng: *mut rfc6979_state); } extern "C" { pub fn generate_rfc6979(rnd: *mut u8, rng: *mut rfc6979_state); } extern "C" { pub fn generate_k_rfc6979(k: *mut bignum256, rng: *mut rfc6979_state); } extern "C" { pub fn get_word(index: u16) -> *const ::std::os::raw::c_char; } extern "C" { pub fn word_index( index: *mut u16, word: *const ::std::os::raw::c_char, word_length: u8, ) -> bool; } extern "C" { pub fn slip39_word_completion_mask(prefix: u16) -> u16; } extern "C" { pub fn button_sequence_to_word(prefix: u16) -> *const ::std::os::raw::c_char; } extern "C" { pub fn schnorr_sign_digest( curve: *const ecdsa_curve, priv_key: *const u8, digest: *const u8, result: *mut u8, ) -> ::std::os::raw::c_int; } extern "C" { pub fn schnorr_verify_digest( curve: *const ecdsa_curve, pub_key: *const u8, msg_hash: *const u8, sign: *const u8, ) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __locale_data { pub _address: u8, }