/* automatically generated by rust-bindgen 0.59.2 */

pub type CK_FLAGS = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _CK_VERSION {
    pub major: ::std::os::raw::c_uchar,
    pub minor: ::std::os::raw::c_uchar,
}
#[test]
fn bindgen_test_layout__CK_VERSION() {
    assert_eq!(
        ::std::mem::size_of::<_CK_VERSION>(),
        2usize,
        concat!("Size of: ", stringify!(_CK_VERSION))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_VERSION>(),
        1usize,
        concat!("Alignment of ", stringify!(_CK_VERSION))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_VERSION>())).major as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_VERSION),
            "::",
            stringify!(major)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_VERSION>())).minor as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_VERSION),
            "::",
            stringify!(minor)
        )
    );
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _CK_INFO {
    pub cryptokiVersion: _CK_VERSION,
    pub manufacturerID: [::std::os::raw::c_uchar; 32usize],
    pub flags: CK_FLAGS,
    pub libraryDescription: [::std::os::raw::c_uchar; 32usize],
    pub libraryVersion: _CK_VERSION,
}
#[test]
fn bindgen_test_layout__CK_INFO() {
    assert_eq!(
        ::std::mem::size_of::<_CK_INFO>(),
        76usize,
        concat!("Size of: ", stringify!(_CK_INFO))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_INFO>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_INFO))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_INFO>())).cryptokiVersion as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_INFO),
            "::",
            stringify!(cryptokiVersion)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_INFO>())).manufacturerID as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_INFO),
            "::",
            stringify!(manufacturerID)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_INFO>())).flags as *const _ as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_INFO),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_INFO>())).libraryDescription as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_INFO),
            "::",
            stringify!(libraryDescription)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_INFO>())).libraryVersion as *const _ as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_INFO),
            "::",
            stringify!(libraryVersion)
        )
    );
}
pub type CK_NOTIFICATION = ::std::os::raw::c_ulong;
pub type CK_SLOT_ID = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _CK_SLOT_INFO {
    pub slotDescription: [::std::os::raw::c_uchar; 64usize],
    pub manufacturerID: [::std::os::raw::c_uchar; 32usize],
    pub flags: CK_FLAGS,
    pub hardwareVersion: _CK_VERSION,
    pub firmwareVersion: _CK_VERSION,
}
#[test]
fn bindgen_test_layout__CK_SLOT_INFO() {
    assert_eq!(
        ::std::mem::size_of::<_CK_SLOT_INFO>(),
        104usize,
        concat!("Size of: ", stringify!(_CK_SLOT_INFO))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_SLOT_INFO>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_SLOT_INFO))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SLOT_INFO>())).slotDescription as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SLOT_INFO),
            "::",
            stringify!(slotDescription)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SLOT_INFO>())).manufacturerID as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SLOT_INFO),
            "::",
            stringify!(manufacturerID)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SLOT_INFO>())).flags as *const _ as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SLOT_INFO),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SLOT_INFO>())).hardwareVersion as *const _ as usize },
        100usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SLOT_INFO),
            "::",
            stringify!(hardwareVersion)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SLOT_INFO>())).firmwareVersion as *const _ as usize },
        102usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SLOT_INFO),
            "::",
            stringify!(firmwareVersion)
        )
    );
}
impl Default for _CK_SLOT_INFO {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _CK_TOKEN_INFO {
    pub label: [::std::os::raw::c_uchar; 32usize],
    pub manufacturerID: [::std::os::raw::c_uchar; 32usize],
    pub model: [::std::os::raw::c_uchar; 16usize],
    pub serialNumber: [::std::os::raw::c_uchar; 16usize],
    pub flags: CK_FLAGS,
    pub ulMaxSessionCount: ::std::os::raw::c_ulong,
    pub ulSessionCount: ::std::os::raw::c_ulong,
    pub ulMaxRwSessionCount: ::std::os::raw::c_ulong,
    pub ulRwSessionCount: ::std::os::raw::c_ulong,
    pub ulMaxPinLen: ::std::os::raw::c_ulong,
    pub ulMinPinLen: ::std::os::raw::c_ulong,
    pub ulTotalPublicMemory: ::std::os::raw::c_ulong,
    pub ulFreePublicMemory: ::std::os::raw::c_ulong,
    pub ulTotalPrivateMemory: ::std::os::raw::c_ulong,
    pub ulFreePrivateMemory: ::std::os::raw::c_ulong,
    pub hardwareVersion: _CK_VERSION,
    pub firmwareVersion: _CK_VERSION,
    pub utcTime: [::std::os::raw::c_uchar; 16usize],
}
#[test]
fn bindgen_test_layout__CK_TOKEN_INFO() {
    assert_eq!(
        ::std::mem::size_of::<_CK_TOKEN_INFO>(),
        160usize,
        concat!("Size of: ", stringify!(_CK_TOKEN_INFO))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_TOKEN_INFO>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_TOKEN_INFO))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).label as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(label)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).manufacturerID as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(manufacturerID)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).model as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(model)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).serialNumber as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(serialNumber)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).flags as *const _ as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulMaxSessionCount as *const _ as usize
        },
        100usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulMaxSessionCount)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulSessionCount as *const _ as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulSessionCount)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulMaxRwSessionCount as *const _ as usize
        },
        108usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulMaxRwSessionCount)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulRwSessionCount as *const _ as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulRwSessionCount)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulMaxPinLen as *const _ as usize },
        116usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulMaxPinLen)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulMinPinLen as *const _ as usize },
        120usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulMinPinLen)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulTotalPublicMemory as *const _ as usize
        },
        124usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulTotalPublicMemory)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulFreePublicMemory as *const _ as usize
        },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulFreePublicMemory)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulTotalPrivateMemory as *const _ as usize
        },
        132usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulTotalPrivateMemory)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).ulFreePrivateMemory as *const _ as usize
        },
        136usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(ulFreePrivateMemory)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).hardwareVersion as *const _ as usize },
        140usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(hardwareVersion)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).firmwareVersion as *const _ as usize },
        142usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(firmwareVersion)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_TOKEN_INFO>())).utcTime as *const _ as usize },
        144usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_TOKEN_INFO),
            "::",
            stringify!(utcTime)
        )
    );
}
pub type CK_SESSION_HANDLE = ::std::os::raw::c_ulong;
pub type CK_USER_TYPE = ::std::os::raw::c_ulong;
pub type CK_STATE = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _CK_SESSION_INFO {
    pub slotID: CK_SLOT_ID,
    pub state: CK_STATE,
    pub flags: CK_FLAGS,
    pub ulDeviceError: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout__CK_SESSION_INFO() {
    assert_eq!(
        ::std::mem::size_of::<_CK_SESSION_INFO>(),
        16usize,
        concat!("Size of: ", stringify!(_CK_SESSION_INFO))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_SESSION_INFO>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_SESSION_INFO))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SESSION_INFO>())).slotID as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SESSION_INFO),
            "::",
            stringify!(slotID)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SESSION_INFO>())).state as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SESSION_INFO),
            "::",
            stringify!(state)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SESSION_INFO>())).flags as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SESSION_INFO),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_SESSION_INFO>())).ulDeviceError as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_SESSION_INFO),
            "::",
            stringify!(ulDeviceError)
        )
    );
}
pub type CK_OBJECT_HANDLE = ::std::os::raw::c_ulong;
pub type CK_OBJECT_CLASS = ::std::os::raw::c_ulong;
pub type CK_HW_FEATURE_TYPE = ::std::os::raw::c_ulong;
pub type CK_KEY_TYPE = ::std::os::raw::c_ulong;
pub type CK_CERTIFICATE_TYPE = ::std::os::raw::c_ulong;
pub type CK_ATTRIBUTE_TYPE = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _CK_ATTRIBUTE {
    pub type_: CK_ATTRIBUTE_TYPE,
    pub pValue: *mut ::std::os::raw::c_void,
    pub ulValueLen: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout__CK_ATTRIBUTE() {
    assert_eq!(
        ::std::mem::size_of::<_CK_ATTRIBUTE>(),
        12usize,
        concat!("Size of: ", stringify!(_CK_ATTRIBUTE))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_ATTRIBUTE>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_ATTRIBUTE))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_ATTRIBUTE>())).type_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_ATTRIBUTE),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_ATTRIBUTE>())).pValue as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_ATTRIBUTE),
            "::",
            stringify!(pValue)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_ATTRIBUTE>())).ulValueLen as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_ATTRIBUTE),
            "::",
            stringify!(ulValueLen)
        )
    );
}
impl Default for _CK_ATTRIBUTE {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _CK_DATE {
    pub year: [::std::os::raw::c_uchar; 4usize],
    pub month: [::std::os::raw::c_uchar; 2usize],
    pub day: [::std::os::raw::c_uchar; 2usize],
}
#[test]
fn bindgen_test_layout__CK_DATE() {
    assert_eq!(
        ::std::mem::size_of::<_CK_DATE>(),
        8usize,
        concat!("Size of: ", stringify!(_CK_DATE))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_DATE>(),
        1usize,
        concat!("Alignment of ", stringify!(_CK_DATE))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_DATE>())).year as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_DATE),
            "::",
            stringify!(year)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_DATE>())).month as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_DATE),
            "::",
            stringify!(month)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_DATE>())).day as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_DATE),
            "::",
            stringify!(day)
        )
    );
}
pub type CK_MECHANISM_TYPE = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _CK_MECHANISM {
    pub mechanism: CK_MECHANISM_TYPE,
    pub pParameter: *mut ::std::os::raw::c_void,
    pub ulParameterLen: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout__CK_MECHANISM() {
    assert_eq!(
        ::std::mem::size_of::<_CK_MECHANISM>(),
        12usize,
        concat!("Size of: ", stringify!(_CK_MECHANISM))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_MECHANISM>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_MECHANISM))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_MECHANISM>())).mechanism as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_MECHANISM),
            "::",
            stringify!(mechanism)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_MECHANISM>())).pParameter as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_MECHANISM),
            "::",
            stringify!(pParameter)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_MECHANISM>())).ulParameterLen as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_MECHANISM),
            "::",
            stringify!(ulParameterLen)
        )
    );
}
impl Default for _CK_MECHANISM {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _CK_MECHANISM_INFO {
    pub ulMinKeySize: ::std::os::raw::c_ulong,
    pub ulMaxKeySize: ::std::os::raw::c_ulong,
    pub flags: CK_FLAGS,
}
#[test]
fn bindgen_test_layout__CK_MECHANISM_INFO() {
    assert_eq!(
        ::std::mem::size_of::<_CK_MECHANISM_INFO>(),
        12usize,
        concat!("Size of: ", stringify!(_CK_MECHANISM_INFO))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_MECHANISM_INFO>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_MECHANISM_INFO))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_MECHANISM_INFO>())).ulMinKeySize as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_MECHANISM_INFO),
            "::",
            stringify!(ulMinKeySize)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_MECHANISM_INFO>())).ulMaxKeySize as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_MECHANISM_INFO),
            "::",
            stringify!(ulMaxKeySize)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_MECHANISM_INFO>())).flags as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_MECHANISM_INFO),
            "::",
            stringify!(flags)
        )
    );
}
pub type CK_PARAM_TYPE = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CK_OTP_PARAM {
    pub type_: CK_PARAM_TYPE,
    pub pValue: *mut ::std::os::raw::c_void,
    pub ulValueLen: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_CK_OTP_PARAM() {
    assert_eq!(
        ::std::mem::size_of::<CK_OTP_PARAM>(),
        12usize,
        concat!("Size of: ", stringify!(CK_OTP_PARAM))
    );
    assert_eq!(
        ::std::mem::align_of::<CK_OTP_PARAM>(),
        4usize,
        concat!("Alignment of ", stringify!(CK_OTP_PARAM))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<CK_OTP_PARAM>())).type_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(CK_OTP_PARAM),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<CK_OTP_PARAM>())).pValue as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(CK_OTP_PARAM),
            "::",
            stringify!(pValue)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<CK_OTP_PARAM>())).ulValueLen as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(CK_OTP_PARAM),
            "::",
            stringify!(ulValueLen)
        )
    );
}
impl Default for CK_OTP_PARAM {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CK_OTP_PARAMS {
    pub pParams: *mut CK_OTP_PARAM,
    pub ulCount: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_CK_OTP_PARAMS() {
    assert_eq!(
        ::std::mem::size_of::<CK_OTP_PARAMS>(),
        8usize,
        concat!("Size of: ", stringify!(CK_OTP_PARAMS))
    );
    assert_eq!(
        ::std::mem::align_of::<CK_OTP_PARAMS>(),
        4usize,
        concat!("Alignment of ", stringify!(CK_OTP_PARAMS))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<CK_OTP_PARAMS>())).pParams as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(CK_OTP_PARAMS),
            "::",
            stringify!(pParams)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<CK_OTP_PARAMS>())).ulCount as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(CK_OTP_PARAMS),
            "::",
            stringify!(ulCount)
        )
    );
}
impl Default for CK_OTP_PARAMS {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CK_OTP_SIGNATURE_INFO {
    pub pParams: *mut CK_OTP_PARAM,
    pub ulCount: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_CK_OTP_SIGNATURE_INFO() {
    assert_eq!(
        ::std::mem::size_of::<CK_OTP_SIGNATURE_INFO>(),
        8usize,
        concat!("Size of: ", stringify!(CK_OTP_SIGNATURE_INFO))
    );
    assert_eq!(
        ::std::mem::align_of::<CK_OTP_SIGNATURE_INFO>(),
        4usize,
        concat!("Alignment of ", stringify!(CK_OTP_SIGNATURE_INFO))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<CK_OTP_SIGNATURE_INFO>())).pParams as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(CK_OTP_SIGNATURE_INFO),
            "::",
            stringify!(pParams)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<CK_OTP_SIGNATURE_INFO>())).ulCount as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(CK_OTP_SIGNATURE_INFO),
            "::",
            stringify!(ulCount)
        )
    );
}
impl Default for CK_OTP_SIGNATURE_INFO {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type CK_RSA_PKCS_MGF_TYPE = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ck_rsa_pkcs_pss_params {
    pub hashAlg: CK_MECHANISM_TYPE,
    pub mgf: CK_RSA_PKCS_MGF_TYPE,
    pub sLen: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_ck_rsa_pkcs_pss_params() {
    assert_eq!(
        ::std::mem::size_of::<ck_rsa_pkcs_pss_params>(),
        12usize,
        concat!("Size of: ", stringify!(ck_rsa_pkcs_pss_params))
    );
    assert_eq!(
        ::std::mem::align_of::<ck_rsa_pkcs_pss_params>(),
        4usize,
        concat!("Alignment of ", stringify!(ck_rsa_pkcs_pss_params))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_rsa_pkcs_pss_params>())).hashAlg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_rsa_pkcs_pss_params),
            "::",
            stringify!(hashAlg)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_rsa_pkcs_pss_params>())).mgf as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_rsa_pkcs_pss_params),
            "::",
            stringify!(mgf)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_rsa_pkcs_pss_params>())).sLen as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_rsa_pkcs_pss_params),
            "::",
            stringify!(sLen)
        )
    );
}
pub type CK_RSA_PKCS_OAEP_SOURCE_TYPE = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ck_rsa_pkcs_oaep_params {
    pub hashAlg: CK_MECHANISM_TYPE,
    pub mgf: CK_RSA_PKCS_MGF_TYPE,
    pub source: CK_RSA_PKCS_OAEP_SOURCE_TYPE,
    pub pSourceData: *mut ::std::os::raw::c_void,
    pub ulSourceDataLen: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_ck_rsa_pkcs_oaep_params() {
    assert_eq!(
        ::std::mem::size_of::<ck_rsa_pkcs_oaep_params>(),
        20usize,
        concat!("Size of: ", stringify!(ck_rsa_pkcs_oaep_params))
    );
    assert_eq!(
        ::std::mem::align_of::<ck_rsa_pkcs_oaep_params>(),
        4usize,
        concat!("Alignment of ", stringify!(ck_rsa_pkcs_oaep_params))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_rsa_pkcs_oaep_params>())).hashAlg as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_rsa_pkcs_oaep_params),
            "::",
            stringify!(hashAlg)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_rsa_pkcs_oaep_params>())).mgf as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_rsa_pkcs_oaep_params),
            "::",
            stringify!(mgf)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_rsa_pkcs_oaep_params>())).source as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_rsa_pkcs_oaep_params),
            "::",
            stringify!(source)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_rsa_pkcs_oaep_params>())).pSourceData as *const _ as usize
        },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_rsa_pkcs_oaep_params),
            "::",
            stringify!(pSourceData)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_rsa_pkcs_oaep_params>())).ulSourceDataLen as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_rsa_pkcs_oaep_params),
            "::",
            stringify!(ulSourceDataLen)
        )
    );
}
impl Default for ck_rsa_pkcs_oaep_params {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ck_aes_ctr_params {
    pub ulCounterBits: ::std::os::raw::c_ulong,
    pub cb: [::std::os::raw::c_uchar; 16usize],
}
#[test]
fn bindgen_test_layout_ck_aes_ctr_params() {
    assert_eq!(
        ::std::mem::size_of::<ck_aes_ctr_params>(),
        20usize,
        concat!("Size of: ", stringify!(ck_aes_ctr_params))
    );
    assert_eq!(
        ::std::mem::align_of::<ck_aes_ctr_params>(),
        4usize,
        concat!("Alignment of ", stringify!(ck_aes_ctr_params))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_aes_ctr_params>())).ulCounterBits as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_aes_ctr_params),
            "::",
            stringify!(ulCounterBits)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_aes_ctr_params>())).cb as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_aes_ctr_params),
            "::",
            stringify!(cb)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ck_gcm_params {
    pub pIv: *mut ::std::os::raw::c_uchar,
    pub ulIvLen: ::std::os::raw::c_ulong,
    pub ulIvBits: ::std::os::raw::c_ulong,
    pub pAAD: *mut ::std::os::raw::c_uchar,
    pub ulAADLen: ::std::os::raw::c_ulong,
    pub ulTagBits: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_ck_gcm_params() {
    assert_eq!(
        ::std::mem::size_of::<ck_gcm_params>(),
        24usize,
        concat!("Size of: ", stringify!(ck_gcm_params))
    );
    assert_eq!(
        ::std::mem::align_of::<ck_gcm_params>(),
        4usize,
        concat!("Alignment of ", stringify!(ck_gcm_params))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_gcm_params>())).pIv as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_gcm_params),
            "::",
            stringify!(pIv)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_gcm_params>())).ulIvLen as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_gcm_params),
            "::",
            stringify!(ulIvLen)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_gcm_params>())).ulIvBits as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_gcm_params),
            "::",
            stringify!(ulIvBits)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_gcm_params>())).pAAD as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_gcm_params),
            "::",
            stringify!(pAAD)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_gcm_params>())).ulAADLen as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_gcm_params),
            "::",
            stringify!(ulAADLen)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_gcm_params>())).ulTagBits as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_gcm_params),
            "::",
            stringify!(ulTagBits)
        )
    );
}
impl Default for ck_gcm_params {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type ck_ec_kdf_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ck_ecdh1_derive_params {
    pub kdf: ck_ec_kdf_t,
    pub ulSharedDataLen: ::std::os::raw::c_ulong,
    pub pSharedData: *mut ::std::os::raw::c_uchar,
    pub ulPublicDataLen: ::std::os::raw::c_ulong,
    pub pPublicData: *mut ::std::os::raw::c_uchar,
}
#[test]
fn bindgen_test_layout_ck_ecdh1_derive_params() {
    assert_eq!(
        ::std::mem::size_of::<ck_ecdh1_derive_params>(),
        20usize,
        concat!("Size of: ", stringify!(ck_ecdh1_derive_params))
    );
    assert_eq!(
        ::std::mem::align_of::<ck_ecdh1_derive_params>(),
        4usize,
        concat!("Alignment of ", stringify!(ck_ecdh1_derive_params))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ck_ecdh1_derive_params>())).kdf as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_ecdh1_derive_params),
            "::",
            stringify!(kdf)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_ecdh1_derive_params>())).ulSharedDataLen as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_ecdh1_derive_params),
            "::",
            stringify!(ulSharedDataLen)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_ecdh1_derive_params>())).pSharedData as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_ecdh1_derive_params),
            "::",
            stringify!(pSharedData)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_ecdh1_derive_params>())).ulPublicDataLen as *const _ as usize
        },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_ecdh1_derive_params),
            "::",
            stringify!(ulPublicDataLen)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_ecdh1_derive_params>())).pPublicData as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_ecdh1_derive_params),
            "::",
            stringify!(pPublicData)
        )
    );
}
impl Default for ck_ecdh1_derive_params {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ck_key_derivation_string_data {
    pub pData: *mut ::std::os::raw::c_uchar,
    pub ulLen: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_ck_key_derivation_string_data() {
    assert_eq!(
        ::std::mem::size_of::<ck_key_derivation_string_data>(),
        8usize,
        concat!("Size of: ", stringify!(ck_key_derivation_string_data))
    );
    assert_eq!(
        ::std::mem::align_of::<ck_key_derivation_string_data>(),
        4usize,
        concat!("Alignment of ", stringify!(ck_key_derivation_string_data))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_key_derivation_string_data>())).pData as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_key_derivation_string_data),
            "::",
            stringify!(pData)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_key_derivation_string_data>())).ulLen as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_key_derivation_string_data),
            "::",
            stringify!(ulLen)
        )
    );
}
impl Default for ck_key_derivation_string_data {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ck_des_cbc_encrypt_data_params {
    pub iv: [::std::os::raw::c_uchar; 8usize],
    pub pData: *mut ::std::os::raw::c_uchar,
    pub length: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_ck_des_cbc_encrypt_data_params() {
    assert_eq!(
        ::std::mem::size_of::<ck_des_cbc_encrypt_data_params>(),
        16usize,
        concat!("Size of: ", stringify!(ck_des_cbc_encrypt_data_params))
    );
    assert_eq!(
        ::std::mem::align_of::<ck_des_cbc_encrypt_data_params>(),
        4usize,
        concat!("Alignment of ", stringify!(ck_des_cbc_encrypt_data_params))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_des_cbc_encrypt_data_params>())).iv as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_des_cbc_encrypt_data_params),
            "::",
            stringify!(iv)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_des_cbc_encrypt_data_params>())).pData as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_des_cbc_encrypt_data_params),
            "::",
            stringify!(pData)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_des_cbc_encrypt_data_params>())).length as *const _ as usize
        },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_des_cbc_encrypt_data_params),
            "::",
            stringify!(length)
        )
    );
}
impl Default for ck_des_cbc_encrypt_data_params {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ck_aes_cbc_encrypt_data_params {
    pub iv: [::std::os::raw::c_uchar; 16usize],
    pub pData: *mut ::std::os::raw::c_uchar,
    pub length: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_ck_aes_cbc_encrypt_data_params() {
    assert_eq!(
        ::std::mem::size_of::<ck_aes_cbc_encrypt_data_params>(),
        24usize,
        concat!("Size of: ", stringify!(ck_aes_cbc_encrypt_data_params))
    );
    assert_eq!(
        ::std::mem::align_of::<ck_aes_cbc_encrypt_data_params>(),
        4usize,
        concat!("Alignment of ", stringify!(ck_aes_cbc_encrypt_data_params))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_aes_cbc_encrypt_data_params>())).iv as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_aes_cbc_encrypt_data_params),
            "::",
            stringify!(iv)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_aes_cbc_encrypt_data_params>())).pData as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_aes_cbc_encrypt_data_params),
            "::",
            stringify!(pData)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ck_aes_cbc_encrypt_data_params>())).length as *const _ as usize
        },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(ck_aes_cbc_encrypt_data_params),
            "::",
            stringify!(length)
        )
    );
}
impl Default for ck_aes_cbc_encrypt_data_params {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type CK_RV = ::std::os::raw::c_ulong;
pub type CK_NOTIFY = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        event: CK_NOTIFICATION,
        application: *mut ::std::os::raw::c_void,
    ) -> CK_RV,
>;
pub type CK_C_Initialize =
    ::std::option::Option<unsafe extern "C" fn(init_args: *mut ::std::os::raw::c_void) -> CK_RV>;
pub type CK_C_Finalize =
    ::std::option::Option<unsafe extern "C" fn(pReserved: *mut ::std::os::raw::c_void) -> CK_RV>;
pub type CK_C_GetInfo = ::std::option::Option<unsafe extern "C" fn(info: *mut _CK_INFO) -> CK_RV>;
pub type CK_C_GetFunctionList = ::std::option::Option<
    unsafe extern "C" fn(function_list: *mut *mut _CK_FUNCTION_LIST) -> CK_RV,
>;
pub type CK_C_GetSlotList = ::std::option::Option<
    unsafe extern "C" fn(
        token_present: ::std::os::raw::c_uchar,
        slot_list: *mut CK_SLOT_ID,
        ulCount: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_GetSlotInfo = ::std::option::Option<
    unsafe extern "C" fn(slotID: CK_SLOT_ID, info: *mut _CK_SLOT_INFO) -> CK_RV,
>;
pub type CK_C_GetTokenInfo = ::std::option::Option<
    unsafe extern "C" fn(slotID: CK_SLOT_ID, info: *mut _CK_TOKEN_INFO) -> CK_RV,
>;
pub type CK_C_WaitForSlotEvent = ::std::option::Option<
    unsafe extern "C" fn(
        flags: CK_FLAGS,
        slot: *mut CK_SLOT_ID,
        pReserved: *mut ::std::os::raw::c_void,
    ) -> CK_RV,
>;
pub type CK_C_GetMechanismList = ::std::option::Option<
    unsafe extern "C" fn(
        slotID: CK_SLOT_ID,
        mechanism_list: *mut CK_MECHANISM_TYPE,
        ulCount: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_GetMechanismInfo = ::std::option::Option<
    unsafe extern "C" fn(
        slotID: CK_SLOT_ID,
        type_: CK_MECHANISM_TYPE,
        info: *mut _CK_MECHANISM_INFO,
    ) -> CK_RV,
>;
pub type CK_C_InitToken = ::std::option::Option<
    unsafe extern "C" fn(
        slotID: CK_SLOT_ID,
        pin: *mut ::std::os::raw::c_uchar,
        pin_len: ::std::os::raw::c_ulong,
        label: *mut ::std::os::raw::c_uchar,
    ) -> CK_RV,
>;
pub type CK_C_InitPIN = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        pin: *mut ::std::os::raw::c_uchar,
        pin_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_SetPIN = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        old_pin: *mut ::std::os::raw::c_uchar,
        old_len: ::std::os::raw::c_ulong,
        new_pin: *mut ::std::os::raw::c_uchar,
        new_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_OpenSession = ::std::option::Option<
    unsafe extern "C" fn(
        slotID: CK_SLOT_ID,
        flags: CK_FLAGS,
        application: *mut ::std::os::raw::c_void,
        notify: CK_NOTIFY,
        session: *mut CK_SESSION_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_CloseSession =
    ::std::option::Option<unsafe extern "C" fn(session: CK_SESSION_HANDLE) -> CK_RV>;
pub type CK_C_CloseAllSessions =
    ::std::option::Option<unsafe extern "C" fn(slotID: CK_SLOT_ID) -> CK_RV>;
pub type CK_C_GetSessionInfo = ::std::option::Option<
    unsafe extern "C" fn(session: CK_SESSION_HANDLE, info: *mut _CK_SESSION_INFO) -> CK_RV,
>;
pub type CK_C_GetOperationState = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        operation_state: *mut ::std::os::raw::c_uchar,
        operation_state_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_SetOperationState = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        operation_state: *mut ::std::os::raw::c_uchar,
        operation_state_len: ::std::os::raw::c_ulong,
        encryption_key: CK_OBJECT_HANDLE,
        authentiation_key: CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_Login = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        user_type: CK_USER_TYPE,
        pin: *mut ::std::os::raw::c_uchar,
        pin_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_Logout =
    ::std::option::Option<unsafe extern "C" fn(session: CK_SESSION_HANDLE) -> CK_RV>;
pub type CK_C_CreateObject = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        templ: *mut _CK_ATTRIBUTE,
        ulCount: ::std::os::raw::c_ulong,
        object: *mut CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_CopyObject = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        object: CK_OBJECT_HANDLE,
        templ: *mut _CK_ATTRIBUTE,
        ulCount: ::std::os::raw::c_ulong,
        new_object: *mut CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_DestroyObject = ::std::option::Option<
    unsafe extern "C" fn(session: CK_SESSION_HANDLE, object: CK_OBJECT_HANDLE) -> CK_RV,
>;
pub type CK_C_GetObjectSize = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        object: CK_OBJECT_HANDLE,
        size: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_GetAttributeValue = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        object: CK_OBJECT_HANDLE,
        templ: *mut _CK_ATTRIBUTE,
        ulCount: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_SetAttributeValue = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        object: CK_OBJECT_HANDLE,
        templ: *mut _CK_ATTRIBUTE,
        ulCount: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_FindObjectsInit = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        templ: *mut _CK_ATTRIBUTE,
        ulCount: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_FindObjects = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        object: *mut CK_OBJECT_HANDLE,
        max_object_count: ::std::os::raw::c_ulong,
        object_count: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_FindObjectsFinal =
    ::std::option::Option<unsafe extern "C" fn(session: CK_SESSION_HANDLE) -> CK_RV>;
pub type CK_C_EncryptInit = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        key: CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_Encrypt = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        data: *mut ::std::os::raw::c_uchar,
        data_len: ::std::os::raw::c_ulong,
        encrypted_data: *mut ::std::os::raw::c_uchar,
        encrypted_data_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_EncryptUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        part: *mut ::std::os::raw::c_uchar,
        part_len: ::std::os::raw::c_ulong,
        encrypted_part: *mut ::std::os::raw::c_uchar,
        encrypted_part_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_EncryptFinal = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        last_encrypted_part: *mut ::std::os::raw::c_uchar,
        last_encrypted_part_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DecryptInit = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        key: CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_Decrypt = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        encrypted_data: *mut ::std::os::raw::c_uchar,
        encrypted_data_len: ::std::os::raw::c_ulong,
        data: *mut ::std::os::raw::c_uchar,
        data_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DecryptUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        encrypted_part: *mut ::std::os::raw::c_uchar,
        encrypted_part_len: ::std::os::raw::c_ulong,
        part: *mut ::std::os::raw::c_uchar,
        part_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DecryptFinal = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        last_part: *mut ::std::os::raw::c_uchar,
        last_part_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DigestInit = ::std::option::Option<
    unsafe extern "C" fn(session: CK_SESSION_HANDLE, mechanism: *mut _CK_MECHANISM) -> CK_RV,
>;
pub type CK_C_Digest = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        data: *mut ::std::os::raw::c_uchar,
        data_len: ::std::os::raw::c_ulong,
        digest: *mut ::std::os::raw::c_uchar,
        digest_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DigestUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        part: *mut ::std::os::raw::c_uchar,
        part_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DigestKey = ::std::option::Option<
    unsafe extern "C" fn(session: CK_SESSION_HANDLE, key: CK_OBJECT_HANDLE) -> CK_RV,
>;
pub type CK_C_DigestFinal = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        digest: *mut ::std::os::raw::c_uchar,
        digest_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_SignInit = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        key: CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_Sign = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        data: *mut ::std::os::raw::c_uchar,
        data_len: ::std::os::raw::c_ulong,
        signature: *mut ::std::os::raw::c_uchar,
        signature_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_SignUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        part: *mut ::std::os::raw::c_uchar,
        part_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_SignFinal = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        signature: *mut ::std::os::raw::c_uchar,
        signature_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_SignRecoverInit = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        key: CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_SignRecover = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        data: *mut ::std::os::raw::c_uchar,
        data_len: ::std::os::raw::c_ulong,
        signature: *mut ::std::os::raw::c_uchar,
        signature_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_VerifyInit = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        key: CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_Verify = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        data: *mut ::std::os::raw::c_uchar,
        data_len: ::std::os::raw::c_ulong,
        signature: *mut ::std::os::raw::c_uchar,
        signature_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_VerifyUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        part: *mut ::std::os::raw::c_uchar,
        part_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_VerifyFinal = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        signature: *mut ::std::os::raw::c_uchar,
        signature_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_VerifyRecoverInit = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        key: CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_VerifyRecover = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        signature: *mut ::std::os::raw::c_uchar,
        signature_len: ::std::os::raw::c_ulong,
        data: *mut ::std::os::raw::c_uchar,
        data_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DigestEncryptUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        part: *mut ::std::os::raw::c_uchar,
        part_len: ::std::os::raw::c_ulong,
        encrypted_part: *mut ::std::os::raw::c_uchar,
        encrypted_part_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DecryptDigestUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        encrypted_part: *mut ::std::os::raw::c_uchar,
        encrypted_part_len: ::std::os::raw::c_ulong,
        part: *mut ::std::os::raw::c_uchar,
        part_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_SignEncryptUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        part: *mut ::std::os::raw::c_uchar,
        part_len: ::std::os::raw::c_ulong,
        encrypted_part: *mut ::std::os::raw::c_uchar,
        encrypted_part_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_DecryptVerifyUpdate = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        encrypted_part: *mut ::std::os::raw::c_uchar,
        encrypted_part_len: ::std::os::raw::c_ulong,
        part: *mut ::std::os::raw::c_uchar,
        part_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_GenerateKey = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        templ: *mut _CK_ATTRIBUTE,
        ulCount: ::std::os::raw::c_ulong,
        key: *mut CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_GenerateKeyPair = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        public_key_template: *mut _CK_ATTRIBUTE,
        public_key_attribute_count: ::std::os::raw::c_ulong,
        private_key_template: *mut _CK_ATTRIBUTE,
        private_key_attribute_count: ::std::os::raw::c_ulong,
        public_key: *mut CK_OBJECT_HANDLE,
        private_key: *mut CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_WrapKey = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        wrapping_key: CK_OBJECT_HANDLE,
        key: CK_OBJECT_HANDLE,
        wrapped_key: *mut ::std::os::raw::c_uchar,
        wrapped_key_len: *mut ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_UnwrapKey = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        unwrapping_key: CK_OBJECT_HANDLE,
        wrapped_key: *mut ::std::os::raw::c_uchar,
        wrapped_key_len: ::std::os::raw::c_ulong,
        templ: *mut _CK_ATTRIBUTE,
        attribute_count: ::std::os::raw::c_ulong,
        key: *mut CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_DeriveKey = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        mechanism: *mut _CK_MECHANISM,
        base_key: CK_OBJECT_HANDLE,
        templ: *mut _CK_ATTRIBUTE,
        attribute_count: ::std::os::raw::c_ulong,
        key: *mut CK_OBJECT_HANDLE,
    ) -> CK_RV,
>;
pub type CK_C_SeedRandom = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        seed: *mut ::std::os::raw::c_uchar,
        seed_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_GenerateRandom = ::std::option::Option<
    unsafe extern "C" fn(
        session: CK_SESSION_HANDLE,
        random_data: *mut ::std::os::raw::c_uchar,
        random_len: ::std::os::raw::c_ulong,
    ) -> CK_RV,
>;
pub type CK_C_GetFunctionStatus =
    ::std::option::Option<unsafe extern "C" fn(session: CK_SESSION_HANDLE) -> CK_RV>;
pub type CK_C_CancelFunction =
    ::std::option::Option<unsafe extern "C" fn(session: CK_SESSION_HANDLE) -> CK_RV>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _CK_FUNCTION_LIST {
    pub version: _CK_VERSION,
    pub C_Initialize: CK_C_Initialize,
    pub C_Finalize: CK_C_Finalize,
    pub C_GetInfo: CK_C_GetInfo,
    pub C_GetFunctionList: CK_C_GetFunctionList,
    pub C_GetSlotList: CK_C_GetSlotList,
    pub C_GetSlotInfo: CK_C_GetSlotInfo,
    pub C_GetTokenInfo: CK_C_GetTokenInfo,
    pub C_GetMechanismList: CK_C_GetMechanismList,
    pub C_GetMechanismInfo: CK_C_GetMechanismInfo,
    pub C_InitToken: CK_C_InitToken,
    pub C_InitPIN: CK_C_InitPIN,
    pub C_SetPIN: CK_C_SetPIN,
    pub C_OpenSession: CK_C_OpenSession,
    pub C_CloseSession: CK_C_CloseSession,
    pub C_CloseAllSessions: CK_C_CloseAllSessions,
    pub C_GetSessionInfo: CK_C_GetSessionInfo,
    pub C_GetOperationState: CK_C_GetOperationState,
    pub C_SetOperationState: CK_C_SetOperationState,
    pub C_Login: CK_C_Login,
    pub C_Logout: CK_C_Logout,
    pub C_CreateObject: CK_C_CreateObject,
    pub C_CopyObject: CK_C_CopyObject,
    pub C_DestroyObject: CK_C_DestroyObject,
    pub C_GetObjectSize: CK_C_GetObjectSize,
    pub C_GetAttributeValue: CK_C_GetAttributeValue,
    pub C_SetAttributeValue: CK_C_SetAttributeValue,
    pub C_FindObjectsInit: CK_C_FindObjectsInit,
    pub C_FindObjects: CK_C_FindObjects,
    pub C_FindObjectsFinal: CK_C_FindObjectsFinal,
    pub C_EncryptInit: CK_C_EncryptInit,
    pub C_Encrypt: CK_C_Encrypt,
    pub C_EncryptUpdate: CK_C_EncryptUpdate,
    pub C_EncryptFinal: CK_C_EncryptFinal,
    pub C_DecryptInit: CK_C_DecryptInit,
    pub C_Decrypt: CK_C_Decrypt,
    pub C_DecryptUpdate: CK_C_DecryptUpdate,
    pub C_DecryptFinal: CK_C_DecryptFinal,
    pub C_DigestInit: CK_C_DigestInit,
    pub C_Digest: CK_C_Digest,
    pub C_DigestUpdate: CK_C_DigestUpdate,
    pub C_DigestKey: CK_C_DigestKey,
    pub C_DigestFinal: CK_C_DigestFinal,
    pub C_SignInit: CK_C_SignInit,
    pub C_Sign: CK_C_Sign,
    pub C_SignUpdate: CK_C_SignUpdate,
    pub C_SignFinal: CK_C_SignFinal,
    pub C_SignRecoverInit: CK_C_SignRecoverInit,
    pub C_SignRecover: CK_C_SignRecover,
    pub C_VerifyInit: CK_C_VerifyInit,
    pub C_Verify: CK_C_Verify,
    pub C_VerifyUpdate: CK_C_VerifyUpdate,
    pub C_VerifyFinal: CK_C_VerifyFinal,
    pub C_VerifyRecoverInit: CK_C_VerifyRecoverInit,
    pub C_VerifyRecover: CK_C_VerifyRecover,
    pub C_DigestEncryptUpdate: CK_C_DigestEncryptUpdate,
    pub C_DecryptDigestUpdate: CK_C_DecryptDigestUpdate,
    pub C_SignEncryptUpdate: CK_C_SignEncryptUpdate,
    pub C_DecryptVerifyUpdate: CK_C_DecryptVerifyUpdate,
    pub C_GenerateKey: CK_C_GenerateKey,
    pub C_GenerateKeyPair: CK_C_GenerateKeyPair,
    pub C_WrapKey: CK_C_WrapKey,
    pub C_UnwrapKey: CK_C_UnwrapKey,
    pub C_DeriveKey: CK_C_DeriveKey,
    pub C_SeedRandom: CK_C_SeedRandom,
    pub C_GenerateRandom: CK_C_GenerateRandom,
    pub C_GetFunctionStatus: CK_C_GetFunctionStatus,
    pub C_CancelFunction: CK_C_CancelFunction,
    pub C_WaitForSlotEvent: CK_C_WaitForSlotEvent,
}
#[test]
fn bindgen_test_layout__CK_FUNCTION_LIST() {
    assert_eq!(
        ::std::mem::size_of::<_CK_FUNCTION_LIST>(),
        276usize,
        concat!("Size of: ", stringify!(_CK_FUNCTION_LIST))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_FUNCTION_LIST>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_FUNCTION_LIST))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).version as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Initialize as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Initialize)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Finalize as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Finalize)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetInfo as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetInfo)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetFunctionList as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetFunctionList)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetSlotList as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetSlotList)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetSlotInfo as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetSlotInfo)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetTokenInfo as *const _ as usize
        },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetTokenInfo)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetMechanismList as *const _ as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetMechanismList)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetMechanismInfo as *const _ as usize
        },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetMechanismInfo)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_InitToken as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_InitToken)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_InitPIN as *const _ as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_InitPIN)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SetPIN as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SetPIN)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_OpenSession as *const _ as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_OpenSession)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_CloseSession as *const _ as usize
        },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_CloseSession)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_CloseAllSessions as *const _ as usize
        },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_CloseAllSessions)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetSessionInfo as *const _ as usize
        },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetSessionInfo)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetOperationState as *const _ as usize
        },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetOperationState)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SetOperationState as *const _ as usize
        },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SetOperationState)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Login as *const _ as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Login)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Logout as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Logout)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_CreateObject as *const _ as usize
        },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_CreateObject)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_CopyObject as *const _ as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_CopyObject)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DestroyObject as *const _ as usize
        },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DestroyObject)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetObjectSize as *const _ as usize
        },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetObjectSize)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetAttributeValue as *const _ as usize
        },
        100usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetAttributeValue)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SetAttributeValue as *const _ as usize
        },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SetAttributeValue)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_FindObjectsInit as *const _ as usize
        },
        108usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_FindObjectsInit)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_FindObjects as *const _ as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_FindObjects)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_FindObjectsFinal as *const _ as usize
        },
        116usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_FindObjectsFinal)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_EncryptInit as *const _ as usize },
        120usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_EncryptInit)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Encrypt as *const _ as usize },
        124usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Encrypt)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_EncryptUpdate as *const _ as usize
        },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_EncryptUpdate)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_EncryptFinal as *const _ as usize
        },
        132usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_EncryptFinal)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DecryptInit as *const _ as usize },
        136usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DecryptInit)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Decrypt as *const _ as usize },
        140usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Decrypt)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DecryptUpdate as *const _ as usize
        },
        144usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DecryptUpdate)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DecryptFinal as *const _ as usize
        },
        148usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DecryptFinal)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DigestInit as *const _ as usize },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DigestInit)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Digest as *const _ as usize },
        156usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Digest)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DigestUpdate as *const _ as usize
        },
        160usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DigestUpdate)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DigestKey as *const _ as usize },
        164usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DigestKey)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DigestFinal as *const _ as usize },
        168usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DigestFinal)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SignInit as *const _ as usize },
        172usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SignInit)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Sign as *const _ as usize },
        176usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Sign)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SignUpdate as *const _ as usize },
        180usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SignUpdate)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SignFinal as *const _ as usize },
        184usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SignFinal)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SignRecoverInit as *const _ as usize
        },
        188usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SignRecoverInit)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SignRecover as *const _ as usize },
        192usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SignRecover)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_VerifyInit as *const _ as usize },
        196usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_VerifyInit)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_Verify as *const _ as usize },
        200usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_Verify)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_VerifyUpdate as *const _ as usize
        },
        204usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_VerifyUpdate)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_VerifyFinal as *const _ as usize },
        208usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_VerifyFinal)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_VerifyRecoverInit as *const _ as usize
        },
        212usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_VerifyRecoverInit)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_VerifyRecover as *const _ as usize
        },
        216usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_VerifyRecover)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DigestEncryptUpdate as *const _ as usize
        },
        220usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DigestEncryptUpdate)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DecryptDigestUpdate as *const _ as usize
        },
        224usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DecryptDigestUpdate)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SignEncryptUpdate as *const _ as usize
        },
        228usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SignEncryptUpdate)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DecryptVerifyUpdate as *const _ as usize
        },
        232usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DecryptVerifyUpdate)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GenerateKey as *const _ as usize },
        236usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GenerateKey)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GenerateKeyPair as *const _ as usize
        },
        240usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GenerateKeyPair)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_WrapKey as *const _ as usize },
        244usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_WrapKey)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_UnwrapKey as *const _ as usize },
        248usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_UnwrapKey)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_DeriveKey as *const _ as usize },
        252usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_DeriveKey)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_SeedRandom as *const _ as usize },
        256usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_SeedRandom)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GenerateRandom as *const _ as usize
        },
        260usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GenerateRandom)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_GetFunctionStatus as *const _ as usize
        },
        264usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_GetFunctionStatus)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_CancelFunction as *const _ as usize
        },
        268usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_CancelFunction)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_FUNCTION_LIST>())).C_WaitForSlotEvent as *const _ as usize
        },
        272usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_FUNCTION_LIST),
            "::",
            stringify!(C_WaitForSlotEvent)
        )
    );
}
pub type CK_CREATEMUTEX =
    ::std::option::Option<unsafe extern "C" fn(mutex: *mut *mut ::std::os::raw::c_void) -> CK_RV>;
pub type CK_DESTROYMUTEX =
    ::std::option::Option<unsafe extern "C" fn(mutex: *mut ::std::os::raw::c_void) -> CK_RV>;
pub type CK_LOCKMUTEX =
    ::std::option::Option<unsafe extern "C" fn(mutex: *mut ::std::os::raw::c_void) -> CK_RV>;
pub type CK_UNLOCKMUTEX =
    ::std::option::Option<unsafe extern "C" fn(mutex: *mut ::std::os::raw::c_void) -> CK_RV>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _CK_C_INITIALIZE_ARGS {
    pub CreateMutex: CK_CREATEMUTEX,
    pub DestroyMutex: CK_DESTROYMUTEX,
    pub LockMutex: CK_LOCKMUTEX,
    pub UnlockMutex: CK_UNLOCKMUTEX,
    pub flags: CK_FLAGS,
    pub pReserved: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout__CK_C_INITIALIZE_ARGS() {
    assert_eq!(
        ::std::mem::size_of::<_CK_C_INITIALIZE_ARGS>(),
        24usize,
        concat!("Size of: ", stringify!(_CK_C_INITIALIZE_ARGS))
    );
    assert_eq!(
        ::std::mem::align_of::<_CK_C_INITIALIZE_ARGS>(),
        4usize,
        concat!("Alignment of ", stringify!(_CK_C_INITIALIZE_ARGS))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_C_INITIALIZE_ARGS>())).CreateMutex as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_C_INITIALIZE_ARGS),
            "::",
            stringify!(CreateMutex)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_C_INITIALIZE_ARGS>())).DestroyMutex as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_C_INITIALIZE_ARGS),
            "::",
            stringify!(DestroyMutex)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_C_INITIALIZE_ARGS>())).LockMutex as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_C_INITIALIZE_ARGS),
            "::",
            stringify!(LockMutex)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<_CK_C_INITIALIZE_ARGS>())).UnlockMutex as *const _ as usize
        },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_C_INITIALIZE_ARGS),
            "::",
            stringify!(UnlockMutex)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_C_INITIALIZE_ARGS>())).flags as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_C_INITIALIZE_ARGS),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<_CK_C_INITIALIZE_ARGS>())).pReserved as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(_CK_C_INITIALIZE_ARGS),
            "::",
            stringify!(pReserved)
        )
    );
}
impl Default for _CK_C_INITIALIZE_ARGS {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type size_t = ::std::os::raw::c_uint;
pub type wchar_t = ::std::os::raw::c_uint;
pub type CK_BYTE = ::std::os::raw::c_uchar;
pub type CK_CHAR = ::std::os::raw::c_uchar;
pub type CK_UTF8CHAR = ::std::os::raw::c_uchar;
pub type CK_BBOOL = ::std::os::raw::c_uchar;
pub type CK_ULONG = ::std::os::raw::c_ulong;
pub type CK_LONG = ::std::os::raw::c_long;
pub type CK_BYTE_PTR = *mut CK_BYTE;
pub type CK_CHAR_PTR = *mut CK_CHAR;
pub type CK_UTF8CHAR_PTR = *mut CK_UTF8CHAR;
pub type CK_ULONG_PTR = *mut CK_ULONG;
pub type CK_VOID_PTR = *mut ::std::os::raw::c_void;
pub type CK_VOID_PTR_PTR = *mut *mut ::std::os::raw::c_void;
pub type CK_VERSION = _CK_VERSION;
pub type CK_VERSION_PTR = *mut _CK_VERSION;
pub type CK_INFO = _CK_INFO;
pub type CK_INFO_PTR = *mut _CK_INFO;
pub type CK_SLOT_ID_PTR = *mut CK_SLOT_ID;
pub type CK_SLOT_INFO = _CK_SLOT_INFO;
pub type CK_SLOT_INFO_PTR = *mut _CK_SLOT_INFO;
pub type CK_TOKEN_INFO = _CK_TOKEN_INFO;
pub type CK_TOKEN_INFO_PTR = *mut _CK_TOKEN_INFO;
pub type CK_SESSION_HANDLE_PTR = *mut CK_SESSION_HANDLE;
pub type CK_SESSION_INFO = _CK_SESSION_INFO;
pub type CK_SESSION_INFO_PTR = *mut _CK_SESSION_INFO;
pub type CK_OBJECT_HANDLE_PTR = *mut CK_OBJECT_HANDLE;
pub type CK_OBJECT_CLASS_PTR = *mut CK_OBJECT_CLASS;
pub type CK_ATTRIBUTE = _CK_ATTRIBUTE;
pub type CK_ATTRIBUTE_PTR = *mut _CK_ATTRIBUTE;
pub type CK_DATE = _CK_DATE;
pub type CK_DATE_PTR = *mut _CK_DATE;
pub type CK_MECHANISM_TYPE_PTR = *mut CK_MECHANISM_TYPE;
pub type CK_MECHANISM = _CK_MECHANISM;
pub type CK_MECHANISM_PTR = *mut _CK_MECHANISM;
pub type CK_MECHANISM_INFO = _CK_MECHANISM_INFO;
pub type CK_MECHANISM_INFO_PTR = *mut _CK_MECHANISM_INFO;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ck_otp_mechanism_info {
    _unused: [u8; 0],
}
pub type CK_OTP_MECHANISM_INFO = ck_otp_mechanism_info;
pub type CK_OTP_MECHANISM_INFO_PTR = *mut ck_otp_mechanism_info;
pub type CK_FUNCTION_LIST = _CK_FUNCTION_LIST;
pub type CK_FUNCTION_LIST_PTR = *mut _CK_FUNCTION_LIST;
pub type CK_FUNCTION_LIST_PTR_PTR = *mut *mut _CK_FUNCTION_LIST;
pub type CK_C_INITIALIZE_ARGS = _CK_C_INITIALIZE_ARGS;
pub type CK_C_INITIALIZE_ARGS_PTR = *mut _CK_C_INITIALIZE_ARGS;
pub type CK_RSA_PKCS_PSS_PARAMS = ck_rsa_pkcs_pss_params;
pub type CK_RSA_PKCS_PSS_PARAMS_PTR = *mut ck_rsa_pkcs_pss_params;
pub type CK_RSA_PKCS_OAEP_PARAMS = ck_rsa_pkcs_oaep_params;
pub type CK_RSA_PKCS_OAEP_PARAMS_PTR = *mut ck_rsa_pkcs_oaep_params;
pub type CK_AES_CTR_PARAMS = ck_aes_ctr_params;
pub type CK_AES_CTR_PARAMS_PTR = *mut ck_aes_ctr_params;
pub type CK_GCM_PARAMS = ck_gcm_params;
pub type CK_GCM_PARAMS_PTR = *mut ck_gcm_params;
pub type CK_ECDH1_DERIVE_PARAMS = ck_ecdh1_derive_params;
pub type CK_ECDH1_DERIVE_PARAMS_PTR = *mut ck_ecdh1_derive_params;
pub type CK_KEY_DERIVATION_STRING_DATA = ck_key_derivation_string_data;
pub type CK_KEY_DERIVATION_STRING_DATA_PTR = *mut ck_key_derivation_string_data;
pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS = ck_des_cbc_encrypt_data_params;
pub type CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut ck_des_cbc_encrypt_data_params;
pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS = ck_aes_cbc_encrypt_data_params;
pub type CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR = *mut ck_aes_cbc_encrypt_data_params;
extern crate libloading;
pub struct Pkcs11 {
    __library: ::libloading::Library,
    pub C_GetFunctionList: Result<
        unsafe extern "C" fn(function_list: *mut *mut _CK_FUNCTION_LIST) -> CK_RV,
        ::libloading::Error,
    >,
}
impl Pkcs11 {
    pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
    where
        P: AsRef<::std::ffi::OsStr>,
    {
        let library = ::libloading::Library::new(path)?;
        Self::from_library(library)
    }
    pub unsafe fn from_library<L>(library: L) -> Result<Self, ::libloading::Error>
    where
        L: Into<::libloading::Library>,
    {
        let __library = library.into();
        let C_GetFunctionList = __library.get(b"C_GetFunctionList\0").map(|sym| *sym);
        Ok(Pkcs11 {
            __library,
            C_GetFunctionList,
        })
    }
    pub unsafe fn C_GetFunctionList(&self, function_list: *mut *mut _CK_FUNCTION_LIST) -> CK_RV {
        (self
            .C_GetFunctionList
            .as_ref()
            .expect("Expected function, got error."))(function_list)
    }
}
