/* automatically generated by rust-bindgen 0.69.2 */ pub const MBEDTLS_BLOWFISH_ENCRYPT: u32 = 1; pub const MBEDTLS_BLOWFISH_DECRYPT: u32 = 0; pub const MBEDTLS_BLOWFISH_MAX_KEY_BITS: u32 = 448; pub const MBEDTLS_BLOWFISH_MIN_KEY_BITS: u32 = 32; pub const MBEDTLS_BLOWFISH_ROUNDS: u32 = 16; pub const MBEDTLS_BLOWFISH_BLOCKSIZE: u32 = 8; pub const MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA: i32 = -22; pub const MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH: i32 = -24; pub const MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED: i32 = -23; #[repr(C)] #[derive(Copy, Clone)] pub struct mbedtls_blowfish_context { P: [u32; 18usize], S: [[u32; 256usize]; 4usize], } #[test] fn bindgen_test_layout_mbedtls_blowfish_context() { const UNINIT: ::core::mem::MaybeUninit = ::core::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::core::mem::size_of::(), 4168usize, concat!("Size of: ", stringify!(mbedtls_blowfish_context)) ); assert_eq!( ::core::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(mbedtls_blowfish_context)) ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).P) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(mbedtls_blowfish_context), "::", stringify!(P) ) ); assert_eq!( unsafe { ::core::ptr::addr_of!((*ptr).S) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(mbedtls_blowfish_context), "::", stringify!(S) ) ); } extern "C" { pub fn mbedtls_blowfish_init(ctx: *mut mbedtls_blowfish_context); } extern "C" { pub fn mbedtls_blowfish_free(ctx: *mut mbedtls_blowfish_context); } extern "C" { pub fn mbedtls_blowfish_setkey( ctx: *mut mbedtls_blowfish_context, key: *const ::core::ffi::c_uchar, keybits: ::core::ffi::c_uint, ) -> ::core::ffi::c_int; } extern "C" { pub fn mbedtls_blowfish_crypt_ecb( ctx: *mut mbedtls_blowfish_context, mode: ::core::ffi::c_int, input: *const ::core::ffi::c_uchar, output: *mut ::core::ffi::c_uchar, ) -> ::core::ffi::c_int; } extern "C" { pub fn mbedtls_blowfish_crypt_cbc( ctx: *mut mbedtls_blowfish_context, mode: ::core::ffi::c_int, length: usize, iv: *mut ::core::ffi::c_uchar, input: *const ::core::ffi::c_uchar, output: *mut ::core::ffi::c_uchar, ) -> ::core::ffi::c_int; } extern "C" { pub fn mbedtls_blowfish_crypt_cfb64( ctx: *mut mbedtls_blowfish_context, mode: ::core::ffi::c_int, length: usize, iv_off: *mut usize, iv: *mut ::core::ffi::c_uchar, input: *const ::core::ffi::c_uchar, output: *mut ::core::ffi::c_uchar, ) -> ::core::ffi::c_int; } extern "C" { pub fn mbedtls_blowfish_crypt_ctr( ctx: *mut mbedtls_blowfish_context, length: usize, nc_off: *mut usize, nonce_counter: *mut ::core::ffi::c_uchar, stream_block: *mut ::core::ffi::c_uchar, input: *const ::core::ffi::c_uchar, output: *mut ::core::ffi::c_uchar, ) -> ::core::ffi::c_int; }