/* automatically generated by rust-bindgen 0.65.1 */ pub const SYMCRYPT_CODE_VERSION_API: u32 = 103; pub const SYMCRYPT_CODE_VERSION_MINOR: u32 = 4; pub const SYMCRYPT_CODE_VERSION_PATCH: u32 = 2; pub const SYMCRYPT_MD5_RESULT_SIZE: u32 = 16; pub const SYMCRYPT_SHA1_RESULT_SIZE: u32 = 20; pub const SYMCRYPT_SHA256_RESULT_SIZE: u32 = 32; pub const SYMCRYPT_SHA384_RESULT_SIZE: u32 = 48; pub const SYMCRYPT_SHA512_RESULT_SIZE: u32 = 64; pub const SYMCRYPT_SHA3_256_RESULT_SIZE: u32 = 32; pub const SYMCRYPT_SHA3_384_RESULT_SIZE: u32 = 48; pub const SYMCRYPT_SHA3_512_RESULT_SIZE: u32 = 64; pub const SYMCRYPT_FLAG_ECKEY_ECDSA: u32 = 4096; pub const SYMCRYPT_FLAG_ECKEY_ECDH: u32 = 8192; pub const SYMCRYPT_FLAG_RSAKEY_SIGN: u32 = 4096; pub const SYMCRYPT_FLAG_RSAKEY_ENCRYPT: u32 = 8192; pub const SYMCRYPT_FLAG_RSA_PKCS1_NO_ASN1: u32 = 1; pub const SYMCRYPT_FLAG_RSA_PKCS1_OPTIONAL_HASH_OID: u32 = 2; pub const SYMCRYPT_ERROR_SYMCRYPT_NO_ERROR: SYMCRYPT_ERROR = 0; pub const SYMCRYPT_ERROR_SYMCRYPT_UNUSED: SYMCRYPT_ERROR = 32768; pub const SYMCRYPT_ERROR_SYMCRYPT_WRONG_KEY_SIZE: SYMCRYPT_ERROR = 32769; pub const SYMCRYPT_ERROR_SYMCRYPT_WRONG_BLOCK_SIZE: SYMCRYPT_ERROR = 32770; pub const SYMCRYPT_ERROR_SYMCRYPT_WRONG_DATA_SIZE: SYMCRYPT_ERROR = 32771; pub const SYMCRYPT_ERROR_SYMCRYPT_WRONG_NONCE_SIZE: SYMCRYPT_ERROR = 32772; pub const SYMCRYPT_ERROR_SYMCRYPT_WRONG_TAG_SIZE: SYMCRYPT_ERROR = 32773; pub const SYMCRYPT_ERROR_SYMCRYPT_WRONG_ITERATION_COUNT: SYMCRYPT_ERROR = 32774; pub const SYMCRYPT_ERROR_SYMCRYPT_AUTHENTICATION_FAILURE: SYMCRYPT_ERROR = 32775; pub const SYMCRYPT_ERROR_SYMCRYPT_EXTERNAL_FAILURE: SYMCRYPT_ERROR = 32776; pub const SYMCRYPT_ERROR_SYMCRYPT_FIPS_FAILURE: SYMCRYPT_ERROR = 32777; pub const SYMCRYPT_ERROR_SYMCRYPT_HARDWARE_FAILURE: SYMCRYPT_ERROR = 32778; pub const SYMCRYPT_ERROR_SYMCRYPT_NOT_IMPLEMENTED: SYMCRYPT_ERROR = 32779; pub const SYMCRYPT_ERROR_SYMCRYPT_INVALID_BLOB: SYMCRYPT_ERROR = 32780; pub const SYMCRYPT_ERROR_SYMCRYPT_BUFFER_TOO_SMALL: SYMCRYPT_ERROR = 32781; pub const SYMCRYPT_ERROR_SYMCRYPT_INVALID_ARGUMENT: SYMCRYPT_ERROR = 32782; pub const SYMCRYPT_ERROR_SYMCRYPT_MEMORY_ALLOCATION_FAILURE: SYMCRYPT_ERROR = 32783; pub const SYMCRYPT_ERROR_SYMCRYPT_SIGNATURE_VERIFICATION_FAILURE: SYMCRYPT_ERROR = 32784; pub const SYMCRYPT_ERROR_SYMCRYPT_INCOMPATIBLE_FORMAT: SYMCRYPT_ERROR = 32785; pub const SYMCRYPT_ERROR_SYMCRYPT_VALUE_TOO_LARGE: SYMCRYPT_ERROR = 32786; pub const SYMCRYPT_ERROR_SYMCRYPT_SESSION_REPLAY_FAILURE: SYMCRYPT_ERROR = 32787; pub const SYMCRYPT_ERROR_SYMCRYPT_HBS_NO_OTS_KEYS_LEFT: SYMCRYPT_ERROR = 32788; pub const SYMCRYPT_ERROR_SYMCRYPT_HBS_PUBLIC_ROOT_MISMATCH: SYMCRYPT_ERROR = 32789; pub type SYMCRYPT_ERROR = ::std::os::raw::c_int; pub const _SYMCRYPT_ECURVE_TYPE_SYMCRYPT_ECURVE_TYPE_NULL: _SYMCRYPT_ECURVE_TYPE = 0; pub const _SYMCRYPT_ECURVE_TYPE_SYMCRYPT_ECURVE_TYPE_SHORT_WEIERSTRASS: _SYMCRYPT_ECURVE_TYPE = 1; pub const _SYMCRYPT_ECURVE_TYPE_SYMCRYPT_ECURVE_TYPE_TWISTED_EDWARDS: _SYMCRYPT_ECURVE_TYPE = 2; pub const _SYMCRYPT_ECURVE_TYPE_SYMCRYPT_ECURVE_TYPE_MONTGOMERY: _SYMCRYPT_ECURVE_TYPE = 3; pub type _SYMCRYPT_ECURVE_TYPE = ::std::os::raw::c_int; pub use self::_SYMCRYPT_ECURVE_TYPE as SYMCRYPT_ECURVE_TYPE; pub type UINT8 = ::std::os::raw::c_uchar; pub type BYTE = ::std::os::raw::c_uchar; pub type UINT32 = ::std::os::raw::c_uint; pub type UINT64 = ::std::os::raw::c_ulonglong; pub type ULONG_PTR = ::std::os::raw::c_ulonglong; pub type SIZE_T = ULONG_PTR; pub type PBYTE = *mut BYTE; pub type PCBYTE = *const BYTE; pub type PCUINT32 = *const UINT32; pub type PUINT64 = *mut UINT64; pub type PCUINT64 = *const UINT64; pub type PVOID = *mut ::std::os::raw::c_void; pub type PCVOID = *const ::std::os::raw::c_void; pub type BOOLEAN = BYTE; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub union __m128i { pub m128i_i8: [::std::os::raw::c_char; 16usize], pub m128i_i16: [::std::os::raw::c_short; 8usize], pub m128i_i32: [::std::os::raw::c_int; 4usize], pub m128i_i64: [::std::os::raw::c_longlong; 2usize], pub m128i_u8: [::std::os::raw::c_uchar; 16usize], pub m128i_u16: [::std::os::raw::c_ushort; 8usize], pub m128i_u32: [::std::os::raw::c_uint; 4usize], pub m128i_u64: [::std::os::raw::c_ulonglong; 2usize], } #[test] fn bindgen_test_layout___m128i() { const UNINIT: ::std::mem::MaybeUninit<__m128i> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__m128i>(), 16usize, concat!("Size of: ", stringify!(__m128i)) ); assert_eq!( ::std::mem::align_of::<__m128i>(), 16usize, concat!("Alignment of ", stringify!(__m128i)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i_i8) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__m128i), "::", stringify!(m128i_i8) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i_i16) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__m128i), "::", stringify!(m128i_i16) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i_i32) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__m128i), "::", stringify!(m128i_i32) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i_i64) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__m128i), "::", stringify!(m128i_i64) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i_u8) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__m128i), "::", stringify!(m128i_u8) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i_u16) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__m128i), "::", stringify!(m128i_u16) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i_u32) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__m128i), "::", stringify!(m128i_u32) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i_u64) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__m128i), "::", stringify!(m128i_u64) ) ); } impl Default for __m128i { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_BLOCKCIPHER = _SYMCRYPT_BLOCKCIPHER; pub type PCSYMCRYPT_BLOCKCIPHER = *const SYMCRYPT_BLOCKCIPHER; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_MD2_CHAINING_STATE { pub C: [BYTE; 16usize], pub X: [BYTE; 48usize], } #[test] fn bindgen_test_layout__SYMCRYPT_MD2_CHAINING_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MD2_CHAINING_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MD2_CHAINING_STATE>(), 64usize, concat!("Size of: ", stringify!(_SYMCRYPT_MD2_CHAINING_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MD2_CHAINING_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MD2_CHAINING_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).C) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD2_CHAINING_STATE), "::", stringify!(C) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).X) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD2_CHAINING_STATE), "::", stringify!(X) ) ); } impl Default for _SYMCRYPT_MD2_CHAINING_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_MD2_CHAINING_STATE = _SYMCRYPT_MD2_CHAINING_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_MD2_STATE { pub bytesInBuffer: UINT32, pub magic: SIZE_T, pub dataLengthL: UINT64, pub dataLengthH: UINT64, pub buffer: [BYTE; 16usize], pub chain: SYMCRYPT_MD2_CHAINING_STATE, } #[test] fn bindgen_test_layout__SYMCRYPT_MD2_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MD2_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MD2_STATE>(), 112usize, concat!("Size of: ", stringify!(_SYMCRYPT_MD2_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MD2_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MD2_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytesInBuffer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD2_STATE), "::", stringify!(bytesInBuffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD2_STATE), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthL) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD2_STATE), "::", stringify!(dataLengthL) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthH) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD2_STATE), "::", stringify!(dataLengthH) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD2_STATE), "::", stringify!(buffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD2_STATE), "::", stringify!(chain) ) ); } impl Default for _SYMCRYPT_MD2_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_MD2_STATE = _SYMCRYPT_MD2_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_MD4_CHAINING_STATE { pub H: [UINT32; 4usize], } #[test] fn bindgen_test_layout__SYMCRYPT_MD4_CHAINING_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MD4_CHAINING_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MD4_CHAINING_STATE>(), 16usize, concat!("Size of: ", stringify!(_SYMCRYPT_MD4_CHAINING_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MD4_CHAINING_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MD4_CHAINING_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).H) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD4_CHAINING_STATE), "::", stringify!(H) ) ); } pub type SYMCRYPT_MD4_CHAINING_STATE = _SYMCRYPT_MD4_CHAINING_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_MD4_STATE { pub bytesInBuffer: UINT32, pub magic: SIZE_T, pub dataLengthL: UINT64, pub dataLengthH: UINT64, pub buffer: [BYTE; 64usize], pub chain: SYMCRYPT_MD4_CHAINING_STATE, } #[test] fn bindgen_test_layout__SYMCRYPT_MD4_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MD4_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MD4_STATE>(), 112usize, concat!("Size of: ", stringify!(_SYMCRYPT_MD4_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MD4_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MD4_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytesInBuffer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD4_STATE), "::", stringify!(bytesInBuffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD4_STATE), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthL) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD4_STATE), "::", stringify!(dataLengthL) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthH) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD4_STATE), "::", stringify!(dataLengthH) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD4_STATE), "::", stringify!(buffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD4_STATE), "::", stringify!(chain) ) ); } impl Default for _SYMCRYPT_MD4_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_MD4_STATE = _SYMCRYPT_MD4_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_MD5_CHAINING_STATE { pub H: [UINT32; 4usize], } #[test] fn bindgen_test_layout__SYMCRYPT_MD5_CHAINING_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MD5_CHAINING_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MD5_CHAINING_STATE>(), 16usize, concat!("Size of: ", stringify!(_SYMCRYPT_MD5_CHAINING_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MD5_CHAINING_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MD5_CHAINING_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).H) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD5_CHAINING_STATE), "::", stringify!(H) ) ); } pub type SYMCRYPT_MD5_CHAINING_STATE = _SYMCRYPT_MD5_CHAINING_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_MD5_STATE { pub bytesInBuffer: UINT32, pub magic: SIZE_T, pub dataLengthL: UINT64, pub dataLengthH: UINT64, pub buffer: [BYTE; 64usize], pub chain: SYMCRYPT_MD5_CHAINING_STATE, } #[test] fn bindgen_test_layout__SYMCRYPT_MD5_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MD5_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MD5_STATE>(), 112usize, concat!("Size of: ", stringify!(_SYMCRYPT_MD5_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MD5_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MD5_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytesInBuffer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD5_STATE), "::", stringify!(bytesInBuffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD5_STATE), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthL) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD5_STATE), "::", stringify!(dataLengthL) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthH) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD5_STATE), "::", stringify!(dataLengthH) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD5_STATE), "::", stringify!(buffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MD5_STATE), "::", stringify!(chain) ) ); } impl Default for _SYMCRYPT_MD5_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_MD5_STATE = _SYMCRYPT_MD5_STATE; pub type PSYMCRYPT_MD5_STATE = *mut _SYMCRYPT_MD5_STATE; pub type PCSYMCRYPT_MD5_STATE = *const SYMCRYPT_MD5_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_SHA1_CHAINING_STATE { pub H: [UINT32; 5usize], } #[test] fn bindgen_test_layout__SYMCRYPT_SHA1_CHAINING_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA1_CHAINING_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA1_CHAINING_STATE>(), 32usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA1_CHAINING_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA1_CHAINING_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA1_CHAINING_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).H) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA1_CHAINING_STATE), "::", stringify!(H) ) ); } pub type SYMCRYPT_SHA1_CHAINING_STATE = _SYMCRYPT_SHA1_CHAINING_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_SHA1_STATE { pub bytesInBuffer: UINT32, pub magic: SIZE_T, pub dataLengthL: UINT64, pub dataLengthH: UINT64, pub buffer: [BYTE; 64usize], pub chain: SYMCRYPT_SHA1_CHAINING_STATE, } #[test] fn bindgen_test_layout__SYMCRYPT_SHA1_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA1_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA1_STATE>(), 128usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA1_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA1_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA1_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytesInBuffer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA1_STATE), "::", stringify!(bytesInBuffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA1_STATE), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthL) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA1_STATE), "::", stringify!(dataLengthL) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthH) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA1_STATE), "::", stringify!(dataLengthH) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA1_STATE), "::", stringify!(buffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA1_STATE), "::", stringify!(chain) ) ); } impl Default for _SYMCRYPT_SHA1_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_SHA1_STATE = _SYMCRYPT_SHA1_STATE; pub type PSYMCRYPT_SHA1_STATE = *mut _SYMCRYPT_SHA1_STATE; pub type PCSYMCRYPT_SHA1_STATE = *const SYMCRYPT_SHA1_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_SHA256_CHAINING_STATE { pub H: [UINT32; 8usize], } #[test] fn bindgen_test_layout__SYMCRYPT_SHA256_CHAINING_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA256_CHAINING_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA256_CHAINING_STATE>(), 32usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA256_CHAINING_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA256_CHAINING_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA256_CHAINING_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).H) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA256_CHAINING_STATE), "::", stringify!(H) ) ); } pub type SYMCRYPT_SHA256_CHAINING_STATE = _SYMCRYPT_SHA256_CHAINING_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_SHA256_STATE { pub bytesInBuffer: UINT32, pub magic: SIZE_T, pub dataLengthL: UINT64, pub dataLengthH: UINT64, pub buffer: [BYTE; 64usize], pub chain: SYMCRYPT_SHA256_CHAINING_STATE, } #[test] fn bindgen_test_layout__SYMCRYPT_SHA256_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA256_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA256_STATE>(), 128usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA256_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA256_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA256_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytesInBuffer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA256_STATE), "::", stringify!(bytesInBuffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA256_STATE), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthL) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA256_STATE), "::", stringify!(dataLengthL) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthH) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA256_STATE), "::", stringify!(dataLengthH) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA256_STATE), "::", stringify!(buffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA256_STATE), "::", stringify!(chain) ) ); } impl Default for _SYMCRYPT_SHA256_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_SHA256_STATE = _SYMCRYPT_SHA256_STATE; pub type PSYMCRYPT_SHA256_STATE = *mut _SYMCRYPT_SHA256_STATE; pub type PCSYMCRYPT_SHA256_STATE = *const SYMCRYPT_SHA256_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_SHA512_CHAINING_STATE { pub H: [UINT64; 8usize], } #[test] fn bindgen_test_layout__SYMCRYPT_SHA512_CHAINING_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA512_CHAINING_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA512_CHAINING_STATE>(), 64usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA512_CHAINING_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA512_CHAINING_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA512_CHAINING_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).H) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA512_CHAINING_STATE), "::", stringify!(H) ) ); } pub type SYMCRYPT_SHA512_CHAINING_STATE = _SYMCRYPT_SHA512_CHAINING_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_SHA512_STATE { pub bytesInBuffer: UINT32, pub magic: SIZE_T, pub dataLengthL: UINT64, pub dataLengthH: UINT64, pub buffer: [BYTE; 128usize], pub chain: SYMCRYPT_SHA512_CHAINING_STATE, } #[test] fn bindgen_test_layout__SYMCRYPT_SHA512_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA512_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA512_STATE>(), 224usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA512_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA512_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA512_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytesInBuffer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA512_STATE), "::", stringify!(bytesInBuffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA512_STATE), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthL) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA512_STATE), "::", stringify!(dataLengthL) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthH) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA512_STATE), "::", stringify!(dataLengthH) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA512_STATE), "::", stringify!(buffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain) as usize - ptr as usize }, 160usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA512_STATE), "::", stringify!(chain) ) ); } impl Default for _SYMCRYPT_SHA512_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_SHA512_STATE = _SYMCRYPT_SHA512_STATE; pub type PSYMCRYPT_SHA512_STATE = *mut _SYMCRYPT_SHA512_STATE; pub type PCSYMCRYPT_SHA512_STATE = *const SYMCRYPT_SHA512_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_SHA384_STATE { pub bytesInBuffer: UINT32, pub magic: SIZE_T, pub dataLengthL: UINT64, pub dataLengthH: UINT64, pub buffer: [BYTE; 128usize], pub chain: SYMCRYPT_SHA512_CHAINING_STATE, } #[test] fn bindgen_test_layout__SYMCRYPT_SHA384_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA384_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA384_STATE>(), 224usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA384_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA384_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA384_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytesInBuffer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA384_STATE), "::", stringify!(bytesInBuffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA384_STATE), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthL) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA384_STATE), "::", stringify!(dataLengthL) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dataLengthH) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA384_STATE), "::", stringify!(dataLengthH) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA384_STATE), "::", stringify!(buffer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chain) as usize - ptr as usize }, 160usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA384_STATE), "::", stringify!(chain) ) ); } impl Default for _SYMCRYPT_SHA384_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_SHA384_STATE = _SYMCRYPT_SHA384_STATE; pub type PSYMCRYPT_SHA384_STATE = *mut _SYMCRYPT_SHA384_STATE; pub type PCSYMCRYPT_SHA384_STATE = *const SYMCRYPT_SHA384_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_KECCAK_STATE { pub state: [UINT64; 25usize], pub inputBlockSize: UINT32, pub stateIndex: UINT32, pub paddingValue: UINT8, pub squeezeMode: BOOLEAN, } #[test] fn bindgen_test_layout__SYMCRYPT_KECCAK_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_KECCAK_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_KECCAK_STATE>(), 224usize, concat!("Size of: ", stringify!(_SYMCRYPT_KECCAK_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_KECCAK_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_KECCAK_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KECCAK_STATE), "::", stringify!(state) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputBlockSize) as usize - ptr as usize }, 200usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KECCAK_STATE), "::", stringify!(inputBlockSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateIndex) as usize - ptr as usize }, 204usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KECCAK_STATE), "::", stringify!(stateIndex) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).paddingValue) as usize - ptr as usize }, 208usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KECCAK_STATE), "::", stringify!(paddingValue) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).squeezeMode) as usize - ptr as usize }, 209usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KECCAK_STATE), "::", stringify!(squeezeMode) ) ); } pub type SYMCRYPT_KECCAK_STATE = _SYMCRYPT_KECCAK_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_SHA3_256_STATE { pub ks: SYMCRYPT_KECCAK_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_SHA3_256_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA3_256_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA3_256_STATE>(), 240usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA3_256_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA3_256_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA3_256_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ks) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA3_256_STATE), "::", stringify!(ks) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA3_256_STATE), "::", stringify!(magic) ) ); } pub type SYMCRYPT_SHA3_256_STATE = _SYMCRYPT_SHA3_256_STATE; pub type PSYMCRYPT_SHA3_256_STATE = *mut _SYMCRYPT_SHA3_256_STATE; pub type PCSYMCRYPT_SHA3_256_STATE = *const SYMCRYPT_SHA3_256_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_SHA3_384_STATE { pub ks: SYMCRYPT_KECCAK_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_SHA3_384_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA3_384_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA3_384_STATE>(), 240usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA3_384_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA3_384_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA3_384_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ks) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA3_384_STATE), "::", stringify!(ks) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA3_384_STATE), "::", stringify!(magic) ) ); } pub type SYMCRYPT_SHA3_384_STATE = _SYMCRYPT_SHA3_384_STATE; pub type PSYMCRYPT_SHA3_384_STATE = *mut _SYMCRYPT_SHA3_384_STATE; pub type PCSYMCRYPT_SHA3_384_STATE = *const SYMCRYPT_SHA3_384_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_SHA3_512_STATE { pub ks: SYMCRYPT_KECCAK_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_SHA3_512_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_SHA3_512_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_SHA3_512_STATE>(), 240usize, concat!("Size of: ", stringify!(_SYMCRYPT_SHA3_512_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_SHA3_512_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_SHA3_512_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ks) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA3_512_STATE), "::", stringify!(ks) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_SHA3_512_STATE), "::", stringify!(magic) ) ); } pub type SYMCRYPT_SHA3_512_STATE = _SYMCRYPT_SHA3_512_STATE; pub type PSYMCRYPT_SHA3_512_STATE = *mut _SYMCRYPT_SHA3_512_STATE; pub type PCSYMCRYPT_SHA3_512_STATE = *const SYMCRYPT_SHA3_512_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_KMAC128_EXPANDED_KEY { pub ks: SYMCRYPT_KECCAK_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_KMAC128_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_KMAC128_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_KMAC128_EXPANDED_KEY>(), 240usize, concat!("Size of: ", stringify!(_SYMCRYPT_KMAC128_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_KMAC128_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_KMAC128_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ks) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KMAC128_EXPANDED_KEY), "::", stringify!(ks) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KMAC128_EXPANDED_KEY), "::", stringify!(magic) ) ); } pub type SYMCRYPT_KMAC128_EXPANDED_KEY = _SYMCRYPT_KMAC128_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_KMAC256_EXPANDED_KEY { pub ks: SYMCRYPT_KECCAK_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_KMAC256_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_KMAC256_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_KMAC256_EXPANDED_KEY>(), 240usize, concat!("Size of: ", stringify!(_SYMCRYPT_KMAC256_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_KMAC256_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_KMAC256_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ks) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KMAC256_EXPANDED_KEY), "::", stringify!(ks) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_KMAC256_EXPANDED_KEY), "::", stringify!(magic) ) ); } pub type SYMCRYPT_KMAC256_EXPANDED_KEY = _SYMCRYPT_KMAC256_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub union _SYMCRYPT_HASH_STATE { pub md2State: SYMCRYPT_MD2_STATE, pub md4State: SYMCRYPT_MD4_STATE, pub md5State: SYMCRYPT_MD5_STATE, pub sha1State: SYMCRYPT_SHA1_STATE, pub sha256State: SYMCRYPT_SHA256_STATE, pub sha384State: SYMCRYPT_SHA384_STATE, pub sha512State: SYMCRYPT_SHA512_STATE, pub sha3_256State: SYMCRYPT_SHA3_256_STATE, pub sha3_384State: SYMCRYPT_SHA3_384_STATE, pub sha3_512State: SYMCRYPT_SHA3_512_STATE, } #[test] fn bindgen_test_layout__SYMCRYPT_HASH_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HASH_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HASH_STATE>(), 240usize, concat!("Size of: ", stringify!(_SYMCRYPT_HASH_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HASH_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HASH_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).md2State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(md2State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).md4State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(md4State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).md5State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(md5State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha1State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(sha1State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha256State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(sha256State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha384State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(sha384State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha512State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(sha512State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha3_256State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(sha3_256State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha3_384State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(sha3_384State) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha3_512State) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH_STATE), "::", stringify!(sha3_512State) ) ); } impl Default for _SYMCRYPT_HASH_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HASH_STATE = _SYMCRYPT_HASH_STATE; pub type SYMCRYPT_HASH = _SYMCRYPT_HASH; pub type PCSYMCRYPT_HASH = *const SYMCRYPT_HASH; pub type PSYMCRYPT_HASH_INIT_FUNC = ::std::option::Option; pub type PSYMCRYPT_HASH_APPEND_FUNC = ::std::option::Option; pub type PSYMCRYPT_HASH_RESULT_FUNC = ::std::option::Option; pub type PSYMCRYPT_HASH_APPEND_BLOCKS_FUNC = ::std::option::Option< unsafe extern "C" fn(pChain: PVOID, pbData: PCBYTE, cbData: SIZE_T, pcbRemaining: *mut SIZE_T), >; pub type PSYMCRYPT_HASH_STATE_COPY_FUNC = ::std::option::Option; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_HASH { pub initFunc: PSYMCRYPT_HASH_INIT_FUNC, pub appendFunc: PSYMCRYPT_HASH_APPEND_FUNC, pub resultFunc: PSYMCRYPT_HASH_RESULT_FUNC, pub appendBlockFunc: PSYMCRYPT_HASH_APPEND_BLOCKS_FUNC, pub stateCopyFunc: PSYMCRYPT_HASH_STATE_COPY_FUNC, pub stateSize: UINT32, pub resultSize: UINT32, pub inputBlockSize: UINT32, pub chainOffset: UINT32, pub chainSize: UINT32, } #[test] fn bindgen_test_layout__SYMCRYPT_HASH() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HASH> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HASH>(), 64usize, concat!("Size of: ", stringify!(_SYMCRYPT_HASH)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HASH>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HASH)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).initFunc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(initFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).appendFunc) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(appendFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resultFunc) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(resultFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).appendBlockFunc) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(appendBlockFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateCopyFunc) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(stateCopyFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateSize) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(stateSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resultSize) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(resultSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inputBlockSize) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(inputBlockSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chainOffset) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(chainOffset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).chainSize) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HASH), "::", stringify!(chainSize) ) ); } #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_HMAC_MD5_EXPANDED_KEY { pub innerState: SYMCRYPT_MD5_CHAINING_STATE, pub outerState: SYMCRYPT_MD5_CHAINING_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_MD5_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_MD5_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_MD5_EXPANDED_KEY>(), 48usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_MD5_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_MD5_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HMAC_MD5_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).innerState) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_MD5_EXPANDED_KEY), "::", stringify!(innerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outerState) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_MD5_EXPANDED_KEY), "::", stringify!(outerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_MD5_EXPANDED_KEY), "::", stringify!(magic) ) ); } pub type SYMCRYPT_HMAC_MD5_EXPANDED_KEY = _SYMCRYPT_HMAC_MD5_EXPANDED_KEY; pub type PSYMCRYPT_HMAC_MD5_EXPANDED_KEY = *mut _SYMCRYPT_HMAC_MD5_EXPANDED_KEY; pub type PCSYMCRYPT_HMAC_MD5_EXPANDED_KEY = *const SYMCRYPT_HMAC_MD5_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_HMAC_MD5_STATE { pub hash: SYMCRYPT_MD5_STATE, pub pKey: PCSYMCRYPT_HMAC_MD5_EXPANDED_KEY, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_MD5_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_MD5_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_MD5_STATE>(), 128usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_MD5_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_MD5_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HMAC_MD5_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_MD5_STATE), "::", stringify!(hash) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pKey) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_MD5_STATE), "::", stringify!(pKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_MD5_STATE), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_HMAC_MD5_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_MD5_STATE = _SYMCRYPT_HMAC_MD5_STATE; pub type PSYMCRYPT_HMAC_MD5_STATE = *mut _SYMCRYPT_HMAC_MD5_STATE; pub type PCSYMCRYPT_HMAC_MD5_STATE = *const SYMCRYPT_HMAC_MD5_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA1_EXPANDED_KEY { pub innerState: SYMCRYPT_SHA1_CHAINING_STATE, pub outerState: SYMCRYPT_SHA1_CHAINING_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA1_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA1_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA1_EXPANDED_KEY>(), 80usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_SHA1_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA1_EXPANDED_KEY>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA1_EXPANDED_KEY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).innerState) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA1_EXPANDED_KEY), "::", stringify!(innerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outerState) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA1_EXPANDED_KEY), "::", stringify!(outerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA1_EXPANDED_KEY), "::", stringify!(magic) ) ); } pub type SYMCRYPT_HMAC_SHA1_EXPANDED_KEY = _SYMCRYPT_HMAC_SHA1_EXPANDED_KEY; pub type PSYMCRYPT_HMAC_SHA1_EXPANDED_KEY = *mut _SYMCRYPT_HMAC_SHA1_EXPANDED_KEY; pub type PCSYMCRYPT_HMAC_SHA1_EXPANDED_KEY = *const SYMCRYPT_HMAC_SHA1_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA1_STATE { pub hash: SYMCRYPT_SHA1_STATE, pub pKey: PCSYMCRYPT_HMAC_SHA1_EXPANDED_KEY, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA1_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA1_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA1_STATE>(), 144usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_SHA1_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA1_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA1_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA1_STATE), "::", stringify!(hash) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pKey) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA1_STATE), "::", stringify!(pKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA1_STATE), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_HMAC_SHA1_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_SHA1_STATE = _SYMCRYPT_HMAC_SHA1_STATE; pub type PSYMCRYPT_HMAC_SHA1_STATE = *mut _SYMCRYPT_HMAC_SHA1_STATE; pub type PCSYMCRYPT_HMAC_SHA1_STATE = *const SYMCRYPT_HMAC_SHA1_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA256_EXPANDED_KEY { pub innerState: SYMCRYPT_SHA256_CHAINING_STATE, pub outerState: SYMCRYPT_SHA256_CHAINING_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA256_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA256_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA256_EXPANDED_KEY>(), 80usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_SHA256_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA256_EXPANDED_KEY>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA256_EXPANDED_KEY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).innerState) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA256_EXPANDED_KEY), "::", stringify!(innerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outerState) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA256_EXPANDED_KEY), "::", stringify!(outerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA256_EXPANDED_KEY), "::", stringify!(magic) ) ); } pub type SYMCRYPT_HMAC_SHA256_EXPANDED_KEY = _SYMCRYPT_HMAC_SHA256_EXPANDED_KEY; pub type PSYMCRYPT_HMAC_SHA256_EXPANDED_KEY = *mut _SYMCRYPT_HMAC_SHA256_EXPANDED_KEY; pub type PCSYMCRYPT_HMAC_SHA256_EXPANDED_KEY = *const SYMCRYPT_HMAC_SHA256_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA256_STATE { pub hash: SYMCRYPT_SHA256_STATE, pub pKey: PCSYMCRYPT_HMAC_SHA256_EXPANDED_KEY, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA256_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA256_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA256_STATE>(), 144usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_SHA256_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA256_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA256_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA256_STATE), "::", stringify!(hash) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pKey) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA256_STATE), "::", stringify!(pKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA256_STATE), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_HMAC_SHA256_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_SHA256_STATE = _SYMCRYPT_HMAC_SHA256_STATE; pub type PSYMCRYPT_HMAC_SHA256_STATE = *mut _SYMCRYPT_HMAC_SHA256_STATE; pub type PCSYMCRYPT_HMAC_SHA256_STATE = *const SYMCRYPT_HMAC_SHA256_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA384_EXPANDED_KEY { pub innerState: SYMCRYPT_SHA512_CHAINING_STATE, pub outerState: SYMCRYPT_SHA512_CHAINING_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA384_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA384_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA384_EXPANDED_KEY>(), 144usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_SHA384_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA384_EXPANDED_KEY>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA384_EXPANDED_KEY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).innerState) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA384_EXPANDED_KEY), "::", stringify!(innerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outerState) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA384_EXPANDED_KEY), "::", stringify!(outerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA384_EXPANDED_KEY), "::", stringify!(magic) ) ); } pub type SYMCRYPT_HMAC_SHA384_EXPANDED_KEY = _SYMCRYPT_HMAC_SHA384_EXPANDED_KEY; pub type PSYMCRYPT_HMAC_SHA384_EXPANDED_KEY = *mut _SYMCRYPT_HMAC_SHA384_EXPANDED_KEY; pub type PCSYMCRYPT_HMAC_SHA384_EXPANDED_KEY = *const SYMCRYPT_HMAC_SHA384_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA384_STATE { pub hash: SYMCRYPT_SHA384_STATE, pub pKey: PCSYMCRYPT_HMAC_SHA384_EXPANDED_KEY, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA384_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA384_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA384_STATE>(), 240usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_SHA384_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA384_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA384_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA384_STATE), "::", stringify!(hash) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pKey) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA384_STATE), "::", stringify!(pKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA384_STATE), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_HMAC_SHA384_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_SHA384_STATE = _SYMCRYPT_HMAC_SHA384_STATE; pub type PSYMCRYPT_HMAC_SHA384_STATE = *mut _SYMCRYPT_HMAC_SHA384_STATE; pub type PCSYMCRYPT_HMAC_SHA384_STATE = *const SYMCRYPT_HMAC_SHA384_STATE; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA512_EXPANDED_KEY { pub innerState: SYMCRYPT_SHA512_CHAINING_STATE, pub outerState: SYMCRYPT_SHA512_CHAINING_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA512_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA512_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA512_EXPANDED_KEY>(), 144usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_SHA512_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA512_EXPANDED_KEY>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA512_EXPANDED_KEY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).innerState) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA512_EXPANDED_KEY), "::", stringify!(innerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outerState) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA512_EXPANDED_KEY), "::", stringify!(outerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA512_EXPANDED_KEY), "::", stringify!(magic) ) ); } pub type SYMCRYPT_HMAC_SHA512_EXPANDED_KEY = _SYMCRYPT_HMAC_SHA512_EXPANDED_KEY; pub type PSYMCRYPT_HMAC_SHA512_EXPANDED_KEY = *mut _SYMCRYPT_HMAC_SHA512_EXPANDED_KEY; pub type PCSYMCRYPT_HMAC_SHA512_EXPANDED_KEY = *const SYMCRYPT_HMAC_SHA512_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA512_STATE { pub hash: SYMCRYPT_SHA512_STATE, pub pKey: PCSYMCRYPT_HMAC_SHA512_EXPANDED_KEY, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA512_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA512_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA512_STATE>(), 240usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_SHA512_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA512_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA512_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA512_STATE), "::", stringify!(hash) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pKey) as usize - ptr as usize }, 224usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA512_STATE), "::", stringify!(pKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 232usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA512_STATE), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_HMAC_SHA512_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_SHA512_STATE = _SYMCRYPT_HMAC_SHA512_STATE; pub type PSYMCRYPT_HMAC_SHA512_STATE = *mut _SYMCRYPT_HMAC_SHA512_STATE; pub type PCSYMCRYPT_HMAC_SHA512_STATE = *const SYMCRYPT_HMAC_SHA512_STATE; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_HMAC_EXPANDED_KEY { pub pHash: PCSYMCRYPT_HASH, pub __bindgen_padding_0: u64, pub innerState: SYMCRYPT_HASH_STATE, pub outerState: SYMCRYPT_HASH_STATE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_EXPANDED_KEY>(), 512usize, concat!("Size of: ", stringify!(_SYMCRYPT_HMAC_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HMAC_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pHash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_EXPANDED_KEY), "::", stringify!(pHash) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).innerState) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_EXPANDED_KEY), "::", stringify!(innerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outerState) as usize - ptr as usize }, 256usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_EXPANDED_KEY), "::", stringify!(outerState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 496usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_EXPANDED_KEY), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_HMAC_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_EXPANDED_KEY = _SYMCRYPT_HMAC_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY { pub generic: SYMCRYPT_HMAC_EXPANDED_KEY, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY>(), 512usize, concat!( "Size of: ", stringify!(_SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY) ) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).generic) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY), "::", stringify!(generic) ) ); } impl Default for _SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY = _SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY { pub generic: SYMCRYPT_HMAC_EXPANDED_KEY, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY>(), 512usize, concat!( "Size of: ", stringify!(_SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY) ) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).generic) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY), "::", stringify!(generic) ) ); } impl Default for _SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY = _SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY { pub generic: SYMCRYPT_HMAC_EXPANDED_KEY, } #[test] fn bindgen_test_layout__SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY>(), 512usize, concat!( "Size of: ", stringify!(_SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY) ) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).generic) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY), "::", stringify!(generic) ) ); } impl Default for _SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY = _SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_AES_EXPANDED_KEY { pub RoundKey: [[[BYTE; 4usize]; 4usize]; 29usize], pub lastEncRoundKey: *mut [[BYTE; 4usize]; 4usize], pub lastDecRoundKey: *mut [[BYTE; 4usize]; 4usize], pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_AES_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_AES_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_AES_EXPANDED_KEY>(), 496usize, concat!("Size of: ", stringify!(_SYMCRYPT_AES_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_AES_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_AES_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).RoundKey) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_AES_EXPANDED_KEY), "::", stringify!(RoundKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lastEncRoundKey) as usize - ptr as usize }, 464usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_AES_EXPANDED_KEY), "::", stringify!(lastEncRoundKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lastDecRoundKey) as usize - ptr as usize }, 472usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_AES_EXPANDED_KEY), "::", stringify!(lastDecRoundKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 480usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_AES_EXPANDED_KEY), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_AES_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_AES_EXPANDED_KEY = _SYMCRYPT_AES_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_AES_CMAC_EXPANDED_KEY { pub aesKey: SYMCRYPT_AES_EXPANDED_KEY, pub K1: [BYTE; 16usize], pub K2: [BYTE; 16usize], pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_AES_CMAC_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_AES_CMAC_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_AES_CMAC_EXPANDED_KEY>(), 544usize, concat!("Size of: ", stringify!(_SYMCRYPT_AES_CMAC_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_AES_CMAC_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_AES_CMAC_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aesKey) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_AES_CMAC_EXPANDED_KEY), "::", stringify!(aesKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).K1) as usize - ptr as usize }, 496usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_AES_CMAC_EXPANDED_KEY), "::", stringify!(K1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).K2) as usize - ptr as usize }, 512usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_AES_CMAC_EXPANDED_KEY), "::", stringify!(K2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 528usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_AES_CMAC_EXPANDED_KEY), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_AES_CMAC_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_AES_CMAC_EXPANDED_KEY = _SYMCRYPT_AES_CMAC_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub union _SYMCRYPT_MAC_EXPANDED_KEY { pub md5Key: SYMCRYPT_HMAC_MD5_EXPANDED_KEY, pub sha1Key: SYMCRYPT_HMAC_SHA1_EXPANDED_KEY, pub sha256Key: SYMCRYPT_HMAC_SHA256_EXPANDED_KEY, pub sha384Key: SYMCRYPT_HMAC_SHA384_EXPANDED_KEY, pub sha512Key: SYMCRYPT_HMAC_SHA512_EXPANDED_KEY, pub sha3_256Key: SYMCRYPT_HMAC_SHA3_256_EXPANDED_KEY, pub sha3_384Key: SYMCRYPT_HMAC_SHA3_384_EXPANDED_KEY, pub sha3_512Key: SYMCRYPT_HMAC_SHA3_512_EXPANDED_KEY, pub aescmacKey: SYMCRYPT_AES_CMAC_EXPANDED_KEY, pub kmac128Key: SYMCRYPT_KMAC128_EXPANDED_KEY, pub kmac256Key: SYMCRYPT_KMAC256_EXPANDED_KEY, } #[test] fn bindgen_test_layout__SYMCRYPT_MAC_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MAC_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MAC_EXPANDED_KEY>(), 544usize, concat!("Size of: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MAC_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).md5Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(md5Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha1Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(sha1Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha256Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(sha256Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha384Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(sha384Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha512Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(sha512Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha3_256Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(sha3_256Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha3_384Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(sha3_384Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sha3_512Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(sha3_512Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aescmacKey) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(aescmacKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kmac128Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(kmac128Key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kmac256Key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC_EXPANDED_KEY), "::", stringify!(kmac256Key) ) ); } impl Default for _SYMCRYPT_MAC_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_MAC_EXPANDED_KEY = _SYMCRYPT_MAC_EXPANDED_KEY; pub type PSYMCRYPT_MAC_EXPAND_KEY = ::std::option::Option< unsafe extern "C" fn(pExpandedKey: PVOID, pbKey: PCBYTE, cbKey: SIZE_T) -> SYMCRYPT_ERROR, >; pub type PSYMCRYPT_MAC_INIT = ::std::option::Option; pub type PSYMCRYPT_MAC_APPEND = ::std::option::Option; pub type PSYMCRYPT_MAC_RESULT = ::std::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_MAC { pub expandKeyFunc: PSYMCRYPT_MAC_EXPAND_KEY, pub initFunc: PSYMCRYPT_MAC_INIT, pub appendFunc: PSYMCRYPT_MAC_APPEND, pub resultFunc: PSYMCRYPT_MAC_RESULT, pub expandedKeySize: SIZE_T, pub stateSize: SIZE_T, pub resultSize: SIZE_T, pub ppHashAlgorithm: *const PCSYMCRYPT_HASH, pub outerChainingStateOffset: UINT32, } #[test] fn bindgen_test_layout__SYMCRYPT_MAC() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MAC> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MAC>(), 72usize, concat!("Size of: ", stringify!(_SYMCRYPT_MAC)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MAC>(), 8usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MAC)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).expandKeyFunc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(expandKeyFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).initFunc) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(initFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).appendFunc) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(appendFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resultFunc) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(resultFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).expandedKeySize) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(expandedKeySize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateSize) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(stateSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resultSize) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(resultSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ppHashAlgorithm) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(ppHashAlgorithm) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).outerChainingStateOffset) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MAC), "::", stringify!(outerChainingStateOffset) ) ); } impl Default for _SYMCRYPT_MAC { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_MAC = _SYMCRYPT_MAC; pub type PCSYMCRYPT_MAC = *const SYMCRYPT_MAC; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub union _SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS { pub aes: SYMCRYPT_AES_EXPANDED_KEY, } #[test] fn bindgen_test_layout__SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS>(), 496usize, concat!( "Size of: ", stringify!(_SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS) ) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).aes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS), "::", stringify!(aes) ) ); } impl Default for _SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS = _SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub union _SYMCRYPT_GF128_ELEMENT { pub ull: [UINT64; 2usize], pub m128i: __m128i, pub ul: [UINT32; 4usize], } #[test] fn bindgen_test_layout__SYMCRYPT_GF128_ELEMENT() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_GF128_ELEMENT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_GF128_ELEMENT>(), 16usize, concat!("Size of: ", stringify!(_SYMCRYPT_GF128_ELEMENT)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_GF128_ELEMENT>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_GF128_ELEMENT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ull) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GF128_ELEMENT), "::", stringify!(ull) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m128i) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GF128_ELEMENT), "::", stringify!(m128i) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ul) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GF128_ELEMENT), "::", stringify!(ul) ) ); } impl Default for _SYMCRYPT_GF128_ELEMENT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_GF128_ELEMENT = _SYMCRYPT_GF128_ELEMENT; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_GHASH_EXPANDED_KEY { pub table: [SYMCRYPT_GF128_ELEMENT; 128usize], } #[test] fn bindgen_test_layout__SYMCRYPT_GHASH_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_GHASH_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_GHASH_EXPANDED_KEY>(), 2048usize, concat!("Size of: ", stringify!(_SYMCRYPT_GHASH_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_GHASH_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_GHASH_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).table) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GHASH_EXPANDED_KEY), "::", stringify!(table) ) ); } impl Default for _SYMCRYPT_GHASH_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_GHASH_EXPANDED_KEY = _SYMCRYPT_GHASH_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_GCM_EXPANDED_KEY { pub ghashKey: SYMCRYPT_GHASH_EXPANDED_KEY, pub pBlockCipher: PCSYMCRYPT_BLOCKCIPHER, pub __bindgen_padding_0: u64, pub blockcipherKey: SYMCRYPT_GCM_SUPPORTED_BLOCKCIPHER_KEYS, pub cbKey: SIZE_T, pub abKey: [BYTE; 32usize], pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_GCM_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_GCM_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_GCM_EXPANDED_KEY>(), 2608usize, concat!("Size of: ", stringify!(_SYMCRYPT_GCM_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_GCM_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_GCM_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ghashKey) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_EXPANDED_KEY), "::", stringify!(ghashKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pBlockCipher) as usize - ptr as usize }, 2048usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_EXPANDED_KEY), "::", stringify!(pBlockCipher) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).blockcipherKey) as usize - ptr as usize }, 2064usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_EXPANDED_KEY), "::", stringify!(blockcipherKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbKey) as usize - ptr as usize }, 2560usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_EXPANDED_KEY), "::", stringify!(cbKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).abKey) as usize - ptr as usize }, 2568usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_EXPANDED_KEY), "::", stringify!(abKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 2600usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_EXPANDED_KEY), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_GCM_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_GCM_EXPANDED_KEY = _SYMCRYPT_GCM_EXPANDED_KEY; pub type PSYMCRYPT_GCM_EXPANDED_KEY = *mut _SYMCRYPT_GCM_EXPANDED_KEY; pub type PCSYMCRYPT_GCM_EXPANDED_KEY = *const SYMCRYPT_GCM_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_GCM_STATE { pub pKey: PCSYMCRYPT_GCM_EXPANDED_KEY, pub cbData: UINT64, pub cbAuthData: UINT64, pub bytesInMacBlock: SIZE_T, pub ghashState: SYMCRYPT_GF128_ELEMENT, pub counterBlock: [BYTE; 16usize], pub macBlock: [BYTE; 16usize], pub keystreamBlock: [BYTE; 16usize], pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_GCM_STATE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_GCM_STATE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_GCM_STATE>(), 112usize, concat!("Size of: ", stringify!(_SYMCRYPT_GCM_STATE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_GCM_STATE>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_GCM_STATE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pKey) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(pKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbData) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(cbData) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbAuthData) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(cbAuthData) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytesInMacBlock) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(bytesInMacBlock) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ghashState) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(ghashState) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).counterBlock) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(counterBlock) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).macBlock) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(macBlock) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keystreamBlock) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(keystreamBlock) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_GCM_STATE), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_GCM_STATE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_GCM_STATE = _SYMCRYPT_GCM_STATE; pub type PSYMCRYPT_GCM_STATE = *mut _SYMCRYPT_GCM_STATE; pub type PCSYMCRYPT_GCM_STATE = *const SYMCRYPT_GCM_STATE; pub type PSYMCRYPT_BLOCKCIPHER_EXPAND_KEY = ::std::option::Option< unsafe extern "C" fn(pExpandedKey: PVOID, pbKey: PCBYTE, cbKey: SIZE_T) -> SYMCRYPT_ERROR, >; pub type PSYMCRYPT_BLOCKCIPHER_CRYPT = ::std::option::Option; pub type PSYMCRYPT_BLOCKCIPHER_CRYPT_ECB = ::std::option::Option< unsafe extern "C" fn(pExpandedKey: PCVOID, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T), >; pub type PSYMCRYPT_BLOCKCIPHER_CRYPT_MODE = ::std::option::Option< unsafe extern "C" fn( pExpandedKey: PCVOID, pbChainingValue: PBYTE, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T, ), >; pub type PSYMCRYPT_BLOCKCIPHER_MAC_MODE = ::std::option::Option< unsafe extern "C" fn( pExpandedKey: PCVOID, pbChainingValue: PBYTE, pbSrc: PCBYTE, cbData: SIZE_T, ), >; pub type PSYMCRYPT_BLOCKCIPHER_AEADPART_MODE = ::std::option::Option< unsafe extern "C" fn(pState: PVOID, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T), >; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_BLOCKCIPHER { pub expandKeyFunc: PSYMCRYPT_BLOCKCIPHER_EXPAND_KEY, pub encryptFunc: PSYMCRYPT_BLOCKCIPHER_CRYPT, pub decryptFunc: PSYMCRYPT_BLOCKCIPHER_CRYPT, pub ecbEncryptFunc: PSYMCRYPT_BLOCKCIPHER_CRYPT_ECB, pub ecbDecryptFunc: PSYMCRYPT_BLOCKCIPHER_CRYPT_ECB, pub cbcEncryptFunc: PSYMCRYPT_BLOCKCIPHER_CRYPT_MODE, pub cbcDecryptFunc: PSYMCRYPT_BLOCKCIPHER_CRYPT_MODE, pub cbcMacFunc: PSYMCRYPT_BLOCKCIPHER_MAC_MODE, pub ctrMsb64Func: PSYMCRYPT_BLOCKCIPHER_CRYPT_MODE, pub gcmEncryptPartFunc: PSYMCRYPT_BLOCKCIPHER_AEADPART_MODE, pub gcmDecryptPartFunc: PSYMCRYPT_BLOCKCIPHER_AEADPART_MODE, pub blockSize: SIZE_T, pub expandedKeySize: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_BLOCKCIPHER() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_BLOCKCIPHER> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_BLOCKCIPHER>(), 104usize, concat!("Size of: ", stringify!(_SYMCRYPT_BLOCKCIPHER)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_BLOCKCIPHER>(), 8usize, concat!("Alignment of ", stringify!(_SYMCRYPT_BLOCKCIPHER)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).expandKeyFunc) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(expandKeyFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).encryptFunc) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(encryptFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).decryptFunc) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(decryptFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecbEncryptFunc) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(ecbEncryptFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ecbDecryptFunc) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(ecbDecryptFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbcEncryptFunc) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(cbcEncryptFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbcDecryptFunc) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(cbcDecryptFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbcMacFunc) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(cbcMacFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ctrMsb64Func) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(ctrMsb64Func) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gcmEncryptPartFunc) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(gcmEncryptPartFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gcmDecryptPartFunc) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(gcmDecryptPartFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).blockSize) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(blockSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).expandedKeySize) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_BLOCKCIPHER), "::", stringify!(expandedKeySize) ) ); } #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_TLSPRF1_2_EXPANDED_KEY { pub macKey: SYMCRYPT_MAC_EXPANDED_KEY, pub macAlg: PCSYMCRYPT_MAC, } #[test] fn bindgen_test_layout__SYMCRYPT_TLSPRF1_2_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_TLSPRF1_2_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_TLSPRF1_2_EXPANDED_KEY>(), 560usize, concat!("Size of: ", stringify!(_SYMCRYPT_TLSPRF1_2_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_TLSPRF1_2_EXPANDED_KEY>(), 16usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_TLSPRF1_2_EXPANDED_KEY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).macKey) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_TLSPRF1_2_EXPANDED_KEY), "::", stringify!(macKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).macAlg) as usize - ptr as usize }, 544usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_TLSPRF1_2_EXPANDED_KEY), "::", stringify!(macAlg) ) ); } impl Default for _SYMCRYPT_TLSPRF1_2_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_TLSPRF1_2_EXPANDED_KEY = _SYMCRYPT_TLSPRF1_2_EXPANDED_KEY; pub type PSYMCRYPT_TLSPRF1_2_EXPANDED_KEY = *mut _SYMCRYPT_TLSPRF1_2_EXPANDED_KEY; pub type PCSYMCRYPT_TLSPRF1_2_EXPANDED_KEY = *const SYMCRYPT_TLSPRF1_2_EXPANDED_KEY; #[repr(C)] #[repr(align(16))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_HKDF_EXPANDED_KEY { pub macKey: SYMCRYPT_MAC_EXPANDED_KEY, pub macAlg: PCSYMCRYPT_MAC, } #[test] fn bindgen_test_layout__SYMCRYPT_HKDF_EXPANDED_KEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_HKDF_EXPANDED_KEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_HKDF_EXPANDED_KEY>(), 560usize, concat!("Size of: ", stringify!(_SYMCRYPT_HKDF_EXPANDED_KEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_HKDF_EXPANDED_KEY>(), 16usize, concat!("Alignment of ", stringify!(_SYMCRYPT_HKDF_EXPANDED_KEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).macKey) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HKDF_EXPANDED_KEY), "::", stringify!(macKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).macAlg) as usize - ptr as usize }, 544usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_HKDF_EXPANDED_KEY), "::", stringify!(macAlg) ) ); } impl Default for _SYMCRYPT_HKDF_EXPANDED_KEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_HKDF_EXPANDED_KEY = _SYMCRYPT_HKDF_EXPANDED_KEY; pub type PSYMCRYPT_HKDF_EXPANDED_KEY = *mut _SYMCRYPT_HKDF_EXPANDED_KEY; pub type PCSYMCRYPT_HKDF_EXPANDED_KEY = *const SYMCRYPT_HKDF_EXPANDED_KEY; pub type SYMCRYPT_INT = _SYMCRYPT_INT; pub type PSYMCRYPT_INT = *mut SYMCRYPT_INT; pub type SYMCRYPT_DIVISOR = _SYMCRYPT_DIVISOR; pub type SYMCRYPT_MODULUS = _SYMCRYPT_MODULUS; pub type PSYMCRYPT_MODULUS = *mut SYMCRYPT_MODULUS; pub type SYMCRYPT_MODELEMENT = _SYMCRYPT_MODELEMENT; pub type PSYMCRYPT_MODELEMENT = *mut SYMCRYPT_MODELEMENT; pub type SYMCRYPT_ECPOINT = _SYMCRYPT_ECPOINT; pub type PSYMCRYPT_ECPOINT = *mut SYMCRYPT_ECPOINT; #[repr(C)] #[repr(align(32))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_INT { pub type_: UINT32, pub nDigits: UINT32, pub cbSize: UINT32, pub magic: SIZE_T, pub __bindgen_padding_0: u64, pub ti: _SYMCRYPT_INT__bindgen_ty_1, } #[repr(C)] #[repr(align(32))] #[derive(Copy, Clone)] pub union _SYMCRYPT_INT__bindgen_ty_1 { pub fdef: _SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1 { pub uint32: [UINT32; 1usize], } #[test] fn bindgen_test_layout__SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1>(), 4usize, concat!( "Size of: ", stringify!(_SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1>(), 4usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uint32) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_INT__bindgen_ty_1__bindgen_ty_1), "::", stringify!(uint32) ) ); } #[test] fn bindgen_test_layout__SYMCRYPT_INT__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_INT__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_INT__bindgen_ty_1>(), 32usize, concat!("Size of: ", stringify!(_SYMCRYPT_INT__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_INT__bindgen_ty_1>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_INT__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fdef) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_INT__bindgen_ty_1), "::", stringify!(fdef) ) ); } impl Default for _SYMCRYPT_INT__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout__SYMCRYPT_INT() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_INT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_INT>(), 64usize, concat!("Size of: ", stringify!(_SYMCRYPT_INT)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_INT>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_INT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_INT), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nDigits) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_INT), "::", stringify!(nDigits) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_INT), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_INT), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ti) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_INT), "::", stringify!(ti) ) ); } impl Default for _SYMCRYPT_INT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[repr(align(32))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_DIVISOR { pub type_: UINT32, pub nDigits: UINT32, pub cbSize: UINT32, pub nBits: UINT32, pub magic: SIZE_T, pub td: _SYMCRYPT_DIVISOR__bindgen_ty_1, pub Int: SYMCRYPT_INT, } #[repr(C)] #[derive(Copy, Clone)] pub union _SYMCRYPT_DIVISOR__bindgen_ty_1 { pub fdef: _SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1 { pub W: UINT64, } #[test] fn bindgen_test_layout__SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1>(), 8usize, concat!( "Size of: ", stringify!(_SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1>(), 8usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).W) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR__bindgen_ty_1__bindgen_ty_1), "::", stringify!(W) ) ); } #[test] fn bindgen_test_layout__SYMCRYPT_DIVISOR__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_DIVISOR__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_DIVISOR__bindgen_ty_1>(), 8usize, concat!("Size of: ", stringify!(_SYMCRYPT_DIVISOR__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_DIVISOR__bindgen_ty_1>(), 8usize, concat!("Alignment of ", stringify!(_SYMCRYPT_DIVISOR__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fdef) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR__bindgen_ty_1), "::", stringify!(fdef) ) ); } impl Default for _SYMCRYPT_DIVISOR__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout__SYMCRYPT_DIVISOR() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_DIVISOR> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_DIVISOR>(), 96usize, concat!("Size of: ", stringify!(_SYMCRYPT_DIVISOR)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_DIVISOR>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_DIVISOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nDigits) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR), "::", stringify!(nDigits) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nBits) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR), "::", stringify!(nBits) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).td) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR), "::", stringify!(td) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Int) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_DIVISOR), "::", stringify!(Int) ) ); } impl Default for _SYMCRYPT_DIVISOR { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[repr(align(32))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_MODULUS { pub type_: UINT32, pub nDigits: UINT32, pub cbSize: UINT32, pub flags: UINT32, pub cbModElement: UINT32, pub inv64: UINT64, pub magic: SIZE_T, pub tm: _SYMCRYPT_MODULUS__bindgen_ty_1, pub __bindgen_padding_0: [u64; 2usize], pub Divisor: SYMCRYPT_DIVISOR, } #[repr(C)] #[derive(Copy, Clone)] pub union _SYMCRYPT_MODULUS__bindgen_ty_1 { pub montgomery: _SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1, pub pseudoMersenne: _SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1 { pub Rsqr: PCUINT32, } #[test] fn bindgen_test_layout__SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1>(), 8usize, concat!( "Size of: ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1>(), 8usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Rsqr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1), "::", stringify!(Rsqr) ) ); } impl Default for _SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2 { pub k: UINT32, } #[test] fn bindgen_test_layout__SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2>(), 4usize, concat!( "Size of: ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2>(), 4usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).k) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1__bindgen_ty_2), "::", stringify!(k) ) ); } #[test] fn bindgen_test_layout__SYMCRYPT_MODULUS__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MODULUS__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MODULUS__bindgen_ty_1>(), 8usize, concat!("Size of: ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MODULUS__bindgen_ty_1>(), 8usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).montgomery) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1), "::", stringify!(montgomery) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pseudoMersenne) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS__bindgen_ty_1), "::", stringify!(pseudoMersenne) ) ); } impl Default for _SYMCRYPT_MODULUS__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout__SYMCRYPT_MODULUS() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MODULUS> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MODULUS>(), 160usize, concat!("Size of: ", stringify!(_SYMCRYPT_MODULUS)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MODULUS>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MODULUS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nDigits) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(nDigits) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSize) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(cbSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbModElement) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(cbModElement) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).inv64) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(inv64) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(magic) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(tm) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Divisor) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODULUS), "::", stringify!(Divisor) ) ); } impl Default for _SYMCRYPT_MODULUS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[repr(align(32))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_MODELEMENT { pub d: _SYMCRYPT_MODELEMENT__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union _SYMCRYPT_MODELEMENT__bindgen_ty_1 { pub uint32: [UINT32; 1usize], } #[test] fn bindgen_test_layout__SYMCRYPT_MODELEMENT__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MODELEMENT__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MODELEMENT__bindgen_ty_1>(), 4usize, concat!("Size of: ", stringify!(_SYMCRYPT_MODELEMENT__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MODELEMENT__bindgen_ty_1>(), 4usize, concat!( "Alignment of ", stringify!(_SYMCRYPT_MODELEMENT__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uint32) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODELEMENT__bindgen_ty_1), "::", stringify!(uint32) ) ); } impl Default for _SYMCRYPT_MODELEMENT__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout__SYMCRYPT_MODELEMENT() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_MODELEMENT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_MODELEMENT>(), 32usize, concat!("Size of: ", stringify!(_SYMCRYPT_MODELEMENT)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_MODELEMENT>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_MODELEMENT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_MODELEMENT), "::", stringify!(d) ) ); } impl Default for _SYMCRYPT_MODELEMENT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[repr(align(32))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_RSAKEY { pub fAlgorithmInfo: UINT32, pub cbTotalSize: UINT32, pub hasPrivateKey: BOOLEAN, pub nSetBitsOfModulus: UINT32, pub nBitsOfModulus: UINT32, pub nDigitsOfModulus: UINT32, pub nPubExp: UINT32, pub nPrimes: UINT32, pub nBitsOfPrimes: [UINT32; 2usize], pub nDigitsOfPrimes: [UINT32; 2usize], pub nMaxDigitsOfPrimes: UINT32, pub au64PubExp: [UINT64; 1usize], pub pbPrimes: [PBYTE; 2usize], pub pbCrtInverses: [PBYTE; 2usize], pub pbPrivExps: [PBYTE; 1usize], pub pbCrtPrivExps: [PBYTE; 2usize], pub pmModulus: PSYMCRYPT_MODULUS, pub pmPrimes: [PSYMCRYPT_MODULUS; 2usize], pub peCrtInverses: [PSYMCRYPT_MODELEMENT; 2usize], pub piPrivExps: [PSYMCRYPT_INT; 1usize], pub piCrtPrivExps: [PSYMCRYPT_INT; 2usize], pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_RSAKEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_RSAKEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_RSAKEY>(), 192usize, concat!("Size of: ", stringify!(_SYMCRYPT_RSAKEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_RSAKEY>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_RSAKEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fAlgorithmInfo) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(fAlgorithmInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbTotalSize) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(cbTotalSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hasPrivateKey) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(hasPrivateKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nSetBitsOfModulus) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(nSetBitsOfModulus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nBitsOfModulus) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(nBitsOfModulus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nDigitsOfModulus) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(nDigitsOfModulus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nPubExp) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(nPubExp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nPrimes) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(nPrimes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nBitsOfPrimes) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(nBitsOfPrimes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nDigitsOfPrimes) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(nDigitsOfPrimes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nMaxDigitsOfPrimes) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(nMaxDigitsOfPrimes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).au64PubExp) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(au64PubExp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbPrimes) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(pbPrimes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbCrtInverses) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(pbCrtInverses) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbPrivExps) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(pbPrivExps) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbCrtPrivExps) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(pbCrtPrivExps) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pmModulus) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(pmModulus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pmPrimes) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(pmPrimes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).peCrtInverses) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(peCrtInverses) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).piPrivExps) as usize - ptr as usize }, 160usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(piPrivExps) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).piCrtPrivExps) as usize - ptr as usize }, 168usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(piCrtPrivExps) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 184usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSAKEY), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_RSAKEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_RSAKEY = _SYMCRYPT_RSAKEY; pub type PSYMCRYPT_RSAKEY = *mut SYMCRYPT_RSAKEY; pub type PCSYMCRYPT_RSAKEY = *const SYMCRYPT_RSAKEY; pub const _SYMCRYPT_ECPOINT_COORDINATES_SYMCRYPT_ECPOINT_COORDINATES_INVALID: _SYMCRYPT_ECPOINT_COORDINATES = 0; pub const _SYMCRYPT_ECPOINT_COORDINATES_SYMCRYPT_ECPOINT_COORDINATES_SINGLE: _SYMCRYPT_ECPOINT_COORDINATES = 17; pub const _SYMCRYPT_ECPOINT_COORDINATES_SYMCRYPT_ECPOINT_COORDINATES_AFFINE: _SYMCRYPT_ECPOINT_COORDINATES = 34; pub const _SYMCRYPT_ECPOINT_COORDINATES_SYMCRYPT_ECPOINT_COORDINATES_PROJECTIVE: _SYMCRYPT_ECPOINT_COORDINATES = 51; pub const _SYMCRYPT_ECPOINT_COORDINATES_SYMCRYPT_ECPOINT_COORDINATES_JACOBIAN: _SYMCRYPT_ECPOINT_COORDINATES = 67; pub const _SYMCRYPT_ECPOINT_COORDINATES_SYMCRYPT_ECPOINT_COORDINATES_EXTENDED_PROJECTIVE: _SYMCRYPT_ECPOINT_COORDINATES = 84; pub const _SYMCRYPT_ECPOINT_COORDINATES_SYMCRYPT_ECPOINT_COORDINATES_SINGLE_PROJECTIVE: _SYMCRYPT_ECPOINT_COORDINATES = 98; pub type _SYMCRYPT_ECPOINT_COORDINATES = ::std::os::raw::c_int; pub use self::_SYMCRYPT_ECPOINT_COORDINATES as SYMCRYPT_ECPOINT_COORDINATES; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_ECURVE_INFO_PRECOMP { pub window: UINT32, pub nPrecompPoints: UINT32, pub nRecodedDigits: UINT32, pub poPrecompPoints: [PSYMCRYPT_ECPOINT; 64usize], } #[test] fn bindgen_test_layout__SYMCRYPT_ECURVE_INFO_PRECOMP() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_ECURVE_INFO_PRECOMP> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_ECURVE_INFO_PRECOMP>(), 528usize, concat!("Size of: ", stringify!(_SYMCRYPT_ECURVE_INFO_PRECOMP)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_ECURVE_INFO_PRECOMP>(), 8usize, concat!("Alignment of ", stringify!(_SYMCRYPT_ECURVE_INFO_PRECOMP)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).window) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_INFO_PRECOMP), "::", stringify!(window) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nPrecompPoints) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_INFO_PRECOMP), "::", stringify!(nPrecompPoints) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nRecodedDigits) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_INFO_PRECOMP), "::", stringify!(nRecodedDigits) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).poPrecompPoints) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_INFO_PRECOMP), "::", stringify!(poPrecompPoints) ) ); } impl Default for _SYMCRYPT_ECURVE_INFO_PRECOMP { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_ECURVE_INFO_PRECOMP = _SYMCRYPT_ECURVE_INFO_PRECOMP; pub const _SYMCRYPT_INTERNAL_ECURVE_TYPE_SYMCRYPT_INTERNAL_ECURVE_TYPE_SHORT_WEIERSTRASS: _SYMCRYPT_INTERNAL_ECURVE_TYPE = 1; pub const _SYMCRYPT_INTERNAL_ECURVE_TYPE_SYMCRYPT_INTERNAL_ECURVE_TYPE_TWISTED_EDWARDS: _SYMCRYPT_INTERNAL_ECURVE_TYPE = 2; pub const _SYMCRYPT_INTERNAL_ECURVE_TYPE_SYMCRYPT_INTERNAL_ECURVE_TYPE_MONTGOMERY: _SYMCRYPT_INTERNAL_ECURVE_TYPE = 3; pub const _SYMCRYPT_INTERNAL_ECURVE_TYPE_SYMCRYPT_INTERNAL_ECURVE_TYPE_SHORT_WEIERSTRASS_AM3: _SYMCRYPT_INTERNAL_ECURVE_TYPE = 4; pub type _SYMCRYPT_INTERNAL_ECURVE_TYPE = ::std::os::raw::c_int; pub use self::_SYMCRYPT_INTERNAL_ECURVE_TYPE as SYMCRYPT_INTERNAL_ECURVE_TYPE; #[repr(C)] #[repr(align(32))] #[derive(Copy, Clone)] pub struct _SYMCRYPT_ECURVE { pub version: UINT32, pub type_: SYMCRYPT_INTERNAL_ECURVE_TYPE, pub eCoordinates: SYMCRYPT_ECPOINT_COORDINATES, pub FModBitsize: UINT32, pub FModDigits: UINT32, pub FModBytesize: UINT32, pub GOrdBitsize: UINT32, pub GOrdDigits: UINT32, pub GOrdBytesize: UINT32, pub cbModElement: UINT32, pub cbAlloc: UINT32, pub cbScratchCommon: UINT32, pub cbScratchScalar: UINT32, pub cbScratchScalarMulti: UINT32, pub cbScratchGetSetValue: UINT32, pub cbScratchEckey: UINT32, pub coFactorPower: UINT32, pub PrivateKeyDefaultFormat: UINT32, pub HighBitRestrictionNumOfBits: UINT32, pub HighBitRestrictionPosition: UINT32, pub HighBitRestrictionValue: UINT32, pub info: _SYMCRYPT_ECURVE__bindgen_ty_1, pub FMod: PSYMCRYPT_MODULUS, pub GOrd: PSYMCRYPT_MODULUS, pub A: PSYMCRYPT_MODELEMENT, pub B: PSYMCRYPT_MODELEMENT, pub G: PSYMCRYPT_ECPOINT, pub H: PSYMCRYPT_INT, pub magic: SIZE_T, } #[repr(C)] #[derive(Copy, Clone)] pub union _SYMCRYPT_ECURVE__bindgen_ty_1 { pub sw: SYMCRYPT_ECURVE_INFO_PRECOMP, } #[test] fn bindgen_test_layout__SYMCRYPT_ECURVE__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_ECURVE__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_ECURVE__bindgen_ty_1>(), 528usize, concat!("Size of: ", stringify!(_SYMCRYPT_ECURVE__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_ECURVE__bindgen_ty_1>(), 8usize, concat!("Alignment of ", stringify!(_SYMCRYPT_ECURVE__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sw) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE__bindgen_ty_1), "::", stringify!(sw) ) ); } impl Default for _SYMCRYPT_ECURVE__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout__SYMCRYPT_ECURVE() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_ECURVE> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_ECURVE>(), 672usize, concat!("Size of: ", stringify!(_SYMCRYPT_ECURVE)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_ECURVE>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_ECURVE)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(version) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).eCoordinates) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(eCoordinates) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).FModBitsize) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(FModBitsize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).FModDigits) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(FModDigits) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).FModBytesize) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(FModBytesize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).GOrdBitsize) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(GOrdBitsize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).GOrdDigits) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(GOrdDigits) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).GOrdBytesize) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(GOrdBytesize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbModElement) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(cbModElement) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbAlloc) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(cbAlloc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbScratchCommon) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(cbScratchCommon) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbScratchScalar) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(cbScratchScalar) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbScratchScalarMulti) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(cbScratchScalarMulti) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbScratchGetSetValue) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(cbScratchGetSetValue) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbScratchEckey) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(cbScratchEckey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).coFactorPower) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(coFactorPower) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).PrivateKeyDefaultFormat) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(PrivateKeyDefaultFormat) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).HighBitRestrictionNumOfBits) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(HighBitRestrictionNumOfBits) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).HighBitRestrictionPosition) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(HighBitRestrictionPosition) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).HighBitRestrictionValue) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(HighBitRestrictionValue) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(info) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).FMod) as usize - ptr as usize }, 616usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(FMod) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).GOrd) as usize - ptr as usize }, 624usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(GOrd) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).A) as usize - ptr as usize }, 632usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(A) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).B) as usize - ptr as usize }, 640usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(B) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).G) as usize - ptr as usize }, 648usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(G) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).H) as usize - ptr as usize }, 656usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(H) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 664usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_ECURVE { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_ECURVE = _SYMCRYPT_ECURVE; pub type PSYMCRYPT_ECURVE = *mut SYMCRYPT_ECURVE; pub type PCSYMCRYPT_ECURVE = *const SYMCRYPT_ECURVE; #[repr(C)] #[repr(align(32))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_ECPOINT { pub normalized: BOOLEAN, pub pCurve: PCSYMCRYPT_ECURVE, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_ECPOINT() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_ECPOINT> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_ECPOINT>(), 32usize, concat!("Size of: ", stringify!(_SYMCRYPT_ECPOINT)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_ECPOINT>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_ECPOINT)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).normalized) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECPOINT), "::", stringify!(normalized) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCurve) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECPOINT), "::", stringify!(pCurve) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECPOINT), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_ECPOINT { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[repr(align(32))] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_ECKEY { pub fAlgorithmInfo: UINT32, pub hasPrivateKey: BOOLEAN, pub pCurve: PCSYMCRYPT_ECURVE, pub poPublicKey: PSYMCRYPT_ECPOINT, pub piPrivateKey: PSYMCRYPT_INT, pub magic: SIZE_T, } #[test] fn bindgen_test_layout__SYMCRYPT_ECKEY() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_ECKEY> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_ECKEY>(), 64usize, concat!("Size of: ", stringify!(_SYMCRYPT_ECKEY)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_ECKEY>(), 32usize, concat!("Alignment of ", stringify!(_SYMCRYPT_ECKEY)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fAlgorithmInfo) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECKEY), "::", stringify!(fAlgorithmInfo) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hasPrivateKey) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECKEY), "::", stringify!(hasPrivateKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pCurve) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECKEY), "::", stringify!(pCurve) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).poPublicKey) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECKEY), "::", stringify!(poPublicKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).piPrivateKey) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECKEY), "::", stringify!(piPrivateKey) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECKEY), "::", stringify!(magic) ) ); } impl Default for _SYMCRYPT_ECKEY { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_ECKEY = _SYMCRYPT_ECKEY; pub type PSYMCRYPT_ECKEY = *mut SYMCRYPT_ECKEY; pub type PCSYMCRYPT_ECKEY = *const SYMCRYPT_ECKEY; extern "C" { pub fn SymCryptWipe(pbData: PVOID, cbData: SIZE_T); } extern "C" { pub fn SymCryptLoadMsbFirstUint64( pbSrc: PCBYTE, cbSrc: SIZE_T, pDst: PUINT64, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptStoreMsbFirstUint64(src: UINT64, pbDst: PBYTE, cbDst: SIZE_T) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptModuleInit(api: UINT32, minor: UINT32); } extern "C" { pub fn SymCryptMd5(pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE); } extern "C" { pub fn SymCryptMd5Init(pState: PSYMCRYPT_MD5_STATE); } extern "C" { pub fn SymCryptMd5Append(pState: PSYMCRYPT_MD5_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptMd5Result(pState: PSYMCRYPT_MD5_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptMd5StateCopy(pSrc: PCSYMCRYPT_MD5_STATE, pDst: PSYMCRYPT_MD5_STATE); } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptMd5Algorithm: PCSYMCRYPT_HASH; } extern "C" { pub fn SymCryptSha1(pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha1Init(pState: PSYMCRYPT_SHA1_STATE); } extern "C" { pub fn SymCryptSha1Append(pState: PSYMCRYPT_SHA1_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptSha1Result(pState: PSYMCRYPT_SHA1_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha1StateCopy(pSrc: PCSYMCRYPT_SHA1_STATE, pDst: PSYMCRYPT_SHA1_STATE); } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha1Algorithm: PCSYMCRYPT_HASH; } extern "C" { pub fn SymCryptSha256(pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha256Init(pState: PSYMCRYPT_SHA256_STATE); } extern "C" { pub fn SymCryptSha256Append(pState: PSYMCRYPT_SHA256_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptSha256Result(pState: PSYMCRYPT_SHA256_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha256StateCopy(pSrc: PCSYMCRYPT_SHA256_STATE, pDst: PSYMCRYPT_SHA256_STATE); } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha256Algorithm: PCSYMCRYPT_HASH; } extern "C" { pub fn SymCryptSha384(pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha384Init(pState: PSYMCRYPT_SHA384_STATE); } extern "C" { pub fn SymCryptSha384Append(pState: PSYMCRYPT_SHA384_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptSha384Result(pState: PSYMCRYPT_SHA384_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha384StateCopy(pSrc: PCSYMCRYPT_SHA384_STATE, pDst: PSYMCRYPT_SHA384_STATE); } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha384Algorithm: PCSYMCRYPT_HASH; } extern "C" { pub fn SymCryptSha512(pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha512Init(pState: PSYMCRYPT_SHA512_STATE); } extern "C" { pub fn SymCryptSha512Append(pState: PSYMCRYPT_SHA512_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptSha512Result(pState: PSYMCRYPT_SHA512_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha512StateCopy(pSrc: PCSYMCRYPT_SHA512_STATE, pDst: PSYMCRYPT_SHA512_STATE); } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha512Algorithm: PCSYMCRYPT_HASH; } extern "C" { pub fn SymCryptSha3_256(pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha3_256Init(pState: PSYMCRYPT_SHA3_256_STATE); } extern "C" { pub fn SymCryptSha3_256Append(pState: PSYMCRYPT_SHA3_256_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptSha3_256Result(pState: PSYMCRYPT_SHA3_256_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha3_256StateCopy( pSrc: PCSYMCRYPT_SHA3_256_STATE, pDst: PSYMCRYPT_SHA3_256_STATE, ); } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha3_256Algorithm: PCSYMCRYPT_HASH; } extern "C" { pub fn SymCryptSha3_384(pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha3_384Init(pState: PSYMCRYPT_SHA3_384_STATE); } extern "C" { pub fn SymCryptSha3_384Append(pState: PSYMCRYPT_SHA3_384_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptSha3_384Result(pState: PSYMCRYPT_SHA3_384_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha3_384StateCopy( pSrc: PCSYMCRYPT_SHA3_384_STATE, pDst: PSYMCRYPT_SHA3_384_STATE, ); } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha3_384Algorithm: PCSYMCRYPT_HASH; } extern "C" { pub fn SymCryptSha3_512(pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha3_512Init(pState: PSYMCRYPT_SHA3_512_STATE); } extern "C" { pub fn SymCryptSha3_512Append(pState: PSYMCRYPT_SHA3_512_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptSha3_512Result(pState: PSYMCRYPT_SHA3_512_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptSha3_512StateCopy( pSrc: PCSYMCRYPT_SHA3_512_STATE, pDst: PSYMCRYPT_SHA3_512_STATE, ); } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha3_512Algorithm: PCSYMCRYPT_HASH; } extern "C" { pub fn SymCryptHmacMd5ExpandKey( pExpandedKey: PSYMCRYPT_HMAC_MD5_EXPANDED_KEY, pbKey: PCBYTE, cbKey: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHmacMd5( pExpandedKey: PCSYMCRYPT_HMAC_MD5_EXPANDED_KEY, pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE, ); } extern "C" { pub fn SymCryptHmacMd5StateCopy( pSrc: PCSYMCRYPT_HMAC_MD5_STATE, pExpandedKey: PCSYMCRYPT_HMAC_MD5_EXPANDED_KEY, pDst: PSYMCRYPT_HMAC_MD5_STATE, ); } extern "C" { pub fn SymCryptHmacMd5Init( pState: PSYMCRYPT_HMAC_MD5_STATE, pExpandedKey: PCSYMCRYPT_HMAC_MD5_EXPANDED_KEY, ); } extern "C" { pub fn SymCryptHmacMd5Append(pState: PSYMCRYPT_HMAC_MD5_STATE, pbData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptHmacMd5Result(pState: PSYMCRYPT_HMAC_MD5_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptHmacSha1ExpandKey( pExpandedKey: PSYMCRYPT_HMAC_SHA1_EXPANDED_KEY, pbKey: PCBYTE, cbKey: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHmacSha1( pExpandedKey: PCSYMCRYPT_HMAC_SHA1_EXPANDED_KEY, pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE, ); } extern "C" { pub fn SymCryptHmacSha1StateCopy( pSrc: PCSYMCRYPT_HMAC_SHA1_STATE, pExpandedKey: PCSYMCRYPT_HMAC_SHA1_EXPANDED_KEY, pDst: PSYMCRYPT_HMAC_SHA1_STATE, ); } extern "C" { pub fn SymCryptHmacSha1Init( pState: PSYMCRYPT_HMAC_SHA1_STATE, pExpandedKey: PCSYMCRYPT_HMAC_SHA1_EXPANDED_KEY, ); } extern "C" { pub fn SymCryptHmacSha1Append( pState: PSYMCRYPT_HMAC_SHA1_STATE, pbData: PCBYTE, cbData: SIZE_T, ); } extern "C" { pub fn SymCryptHmacSha1Result(pState: PSYMCRYPT_HMAC_SHA1_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptHmacSha256ExpandKey( pExpandedKey: PSYMCRYPT_HMAC_SHA256_EXPANDED_KEY, pbKey: PCBYTE, cbKey: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHmacSha256( pExpandedKey: PCSYMCRYPT_HMAC_SHA256_EXPANDED_KEY, pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE, ); } extern "C" { pub fn SymCryptHmacSha256StateCopy( pSrc: PCSYMCRYPT_HMAC_SHA256_STATE, pExpandedKey: PCSYMCRYPT_HMAC_SHA256_EXPANDED_KEY, pDst: PSYMCRYPT_HMAC_SHA256_STATE, ); } extern "C" { pub fn SymCryptHmacSha256Init( pState: PSYMCRYPT_HMAC_SHA256_STATE, pExpandedKey: PCSYMCRYPT_HMAC_SHA256_EXPANDED_KEY, ); } extern "C" { pub fn SymCryptHmacSha256Append( pState: PSYMCRYPT_HMAC_SHA256_STATE, pbData: PCBYTE, cbData: SIZE_T, ); } extern "C" { pub fn SymCryptHmacSha256Result(pState: PSYMCRYPT_HMAC_SHA256_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptHmacSha384ExpandKey( pExpandedKey: PSYMCRYPT_HMAC_SHA384_EXPANDED_KEY, pbKey: PCBYTE, cbKey: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHmacSha384( pExpandedKey: PCSYMCRYPT_HMAC_SHA384_EXPANDED_KEY, pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE, ); } extern "C" { pub fn SymCryptHmacSha384StateCopy( pSrc: PCSYMCRYPT_HMAC_SHA384_STATE, pExpandedKey: PCSYMCRYPT_HMAC_SHA384_EXPANDED_KEY, pDst: PSYMCRYPT_HMAC_SHA384_STATE, ); } extern "C" { pub fn SymCryptHmacSha384Init( pState: PSYMCRYPT_HMAC_SHA384_STATE, pExpandedKey: PCSYMCRYPT_HMAC_SHA384_EXPANDED_KEY, ); } extern "C" { pub fn SymCryptHmacSha384Append( pState: PSYMCRYPT_HMAC_SHA384_STATE, pbData: PCBYTE, cbData: SIZE_T, ); } extern "C" { pub fn SymCryptHmacSha384Result(pState: PSYMCRYPT_HMAC_SHA384_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptHmacSha512ExpandKey( pExpandedKey: PSYMCRYPT_HMAC_SHA512_EXPANDED_KEY, pbKey: PCBYTE, cbKey: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHmacSha512( pExpandedKey: PCSYMCRYPT_HMAC_SHA512_EXPANDED_KEY, pbData: PCBYTE, cbData: SIZE_T, pbResult: PBYTE, ); } extern "C" { pub fn SymCryptHmacSha512StateCopy( pSrc: PCSYMCRYPT_HMAC_SHA512_STATE, pExpandedKey: PCSYMCRYPT_HMAC_SHA512_EXPANDED_KEY, pDst: PSYMCRYPT_HMAC_SHA512_STATE, ); } extern "C" { pub fn SymCryptHmacSha512Init( pState: PSYMCRYPT_HMAC_SHA512_STATE, pExpandedKey: PCSYMCRYPT_HMAC_SHA512_EXPANDED_KEY, ); } extern "C" { pub fn SymCryptHmacSha512Append( pState: PSYMCRYPT_HMAC_SHA512_STATE, pbData: PCBYTE, cbData: SIZE_T, ); } extern "C" { pub fn SymCryptHmacSha512Result(pState: PSYMCRYPT_HMAC_SHA512_STATE, pbResult: PBYTE); } extern "C" { pub fn SymCryptChaCha20Poly1305Encrypt( pbKey: PCBYTE, cbKey: SIZE_T, pbNonce: PCBYTE, cbNonce: SIZE_T, pbAuthData: PCBYTE, cbAuthData: SIZE_T, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T, pbTag: PBYTE, cbTag: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptChaCha20Poly1305Decrypt( pbKey: PCBYTE, cbKey: SIZE_T, pbNonce: PCBYTE, cbNonce: SIZE_T, pbAuthData: PCBYTE, cbAuthData: SIZE_T, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T, pbTag: PCBYTE, cbTag: SIZE_T, ) -> SYMCRYPT_ERROR; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptAesBlockCipher: PCSYMCRYPT_BLOCKCIPHER; } extern "C" { pub fn SymCryptGcmValidateParameters( pBlockCipher: PCSYMCRYPT_BLOCKCIPHER, cbNonce: SIZE_T, cbAssociatedData: UINT64, cbData: UINT64, cbTag: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptGcmExpandKey( pExpandedKey: PSYMCRYPT_GCM_EXPANDED_KEY, pBlockCipher: PCSYMCRYPT_BLOCKCIPHER, pbKey: PCBYTE, cbKey: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptGcmEncrypt( pExpandedKey: PCSYMCRYPT_GCM_EXPANDED_KEY, pbNonce: PCBYTE, cbNonce: SIZE_T, pbAuthData: PCBYTE, cbAuthData: SIZE_T, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T, pbTag: PBYTE, cbTag: SIZE_T, ); } extern "C" { pub fn SymCryptGcmDecrypt( pExpandedKey: PCSYMCRYPT_GCM_EXPANDED_KEY, pbNonce: PCBYTE, cbNonce: SIZE_T, pbAuthData: PCBYTE, cbAuthData: SIZE_T, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T, pbTag: PCBYTE, cbTag: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptGcmInit( pState: PSYMCRYPT_GCM_STATE, pExpandedKey: PCSYMCRYPT_GCM_EXPANDED_KEY, pbNonce: PCBYTE, cbNonce: SIZE_T, ); } extern "C" { pub fn SymCryptGcmStateCopy( pSrc: PCSYMCRYPT_GCM_STATE, pExpandedKeyCopy: PCSYMCRYPT_GCM_EXPANDED_KEY, pDst: PSYMCRYPT_GCM_STATE, ); } extern "C" { pub fn SymCryptGcmAuthPart(pState: PSYMCRYPT_GCM_STATE, pbAuthData: PCBYTE, cbData: SIZE_T); } extern "C" { pub fn SymCryptGcmEncryptPart( pState: PSYMCRYPT_GCM_STATE, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T, ); } extern "C" { pub fn SymCryptGcmEncryptFinal(pState: PSYMCRYPT_GCM_STATE, pbTag: PBYTE, cbTag: SIZE_T); } extern "C" { pub fn SymCryptGcmDecryptPart( pState: PSYMCRYPT_GCM_STATE, pbSrc: PCBYTE, pbDst: PBYTE, cbData: SIZE_T, ); } extern "C" { pub fn SymCryptGcmDecryptFinal( pState: PSYMCRYPT_GCM_STATE, pbTag: PCBYTE, cbTag: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptTlsPrf1_2ExpandKey( pExpandedKey: PSYMCRYPT_TLSPRF1_2_EXPANDED_KEY, macAlgorithm: PCSYMCRYPT_MAC, pbKey: PCBYTE, cbKey: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptTlsPrf1_2Derive( pExpandedKey: PCSYMCRYPT_TLSPRF1_2_EXPANDED_KEY, pbLabel: PCBYTE, cbLabel: SIZE_T, pbSeed: PCBYTE, cbSeed: SIZE_T, pbResult: PBYTE, cbResult: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptTlsPrf1_2( macAlgorithm: PCSYMCRYPT_MAC, pbKey: PCBYTE, cbKey: SIZE_T, pbLabel: PCBYTE, cbLabel: SIZE_T, pbSeed: PCBYTE, cbSeed: SIZE_T, pbResult: PBYTE, cbResult: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHkdfExpandKey( pExpandedKey: PSYMCRYPT_HKDF_EXPANDED_KEY, macAlgorithm: PCSYMCRYPT_MAC, pbIkm: PCBYTE, cbIkm: SIZE_T, pbSalt: PCBYTE, cbSalt: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHkdfExtractPrk( macAlgorithm: PCSYMCRYPT_MAC, pbIkm: PCBYTE, cbIkm: SIZE_T, pbSalt: PCBYTE, cbSalt: SIZE_T, pbPrk: PBYTE, cbPrk: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHkdfPrkExpandKey( pExpandedKey: PSYMCRYPT_HKDF_EXPANDED_KEY, macAlgorithm: PCSYMCRYPT_MAC, pbPrk: PCBYTE, cbPrk: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHkdfDerive( pExpandedKey: PCSYMCRYPT_HKDF_EXPANDED_KEY, pbInfo: PCBYTE, cbInfo: SIZE_T, pbResult: PBYTE, cbResult: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHkdf( macAlgorithm: PCSYMCRYPT_MAC, pbIkm: PCBYTE, cbIkm: SIZE_T, pbSalt: PCBYTE, cbSalt: SIZE_T, pbInfo: PCBYTE, cbInfo: SIZE_T, pbResult: PBYTE, cbResult: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptHkdfSelfTest(); } extern "C" { pub fn SymCryptRandom(pbRandom: PBYTE, cbRandom: SIZE_T); } pub const _SYMCRYPT_NUMBER_FORMAT_SYMCRYPT_NUMBER_FORMAT_LSB_FIRST: _SYMCRYPT_NUMBER_FORMAT = 1; pub const _SYMCRYPT_NUMBER_FORMAT_SYMCRYPT_NUMBER_FORMAT_MSB_FIRST: _SYMCRYPT_NUMBER_FORMAT = 2; pub type _SYMCRYPT_NUMBER_FORMAT = ::std::os::raw::c_int; pub use self::_SYMCRYPT_NUMBER_FORMAT as SYMCRYPT_NUMBER_FORMAT; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct _SYMCRYPT_RSA_PARAMS { pub version: UINT32, pub nBitsOfModulus: UINT32, pub nPrimes: UINT32, pub nPubExp: UINT32, } #[test] fn bindgen_test_layout__SYMCRYPT_RSA_PARAMS() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_RSA_PARAMS> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_RSA_PARAMS>(), 16usize, concat!("Size of: ", stringify!(_SYMCRYPT_RSA_PARAMS)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_RSA_PARAMS>(), 4usize, concat!("Alignment of ", stringify!(_SYMCRYPT_RSA_PARAMS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSA_PARAMS), "::", stringify!(version) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nBitsOfModulus) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSA_PARAMS), "::", stringify!(nBitsOfModulus) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nPrimes) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSA_PARAMS), "::", stringify!(nPrimes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nPubExp) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_RSA_PARAMS), "::", stringify!(nPubExp) ) ); } pub type SYMCRYPT_RSA_PARAMS = _SYMCRYPT_RSA_PARAMS; pub type PCSYMCRYPT_RSA_PARAMS = *const SYMCRYPT_RSA_PARAMS; pub const _SYMCRYPT_ECURVE_GEN_ALG_ID_SYMCRYPT_ECURVE_GEN_ALG_ID_NULL: _SYMCRYPT_ECURVE_GEN_ALG_ID = 0; pub type _SYMCRYPT_ECURVE_GEN_ALG_ID = ::std::os::raw::c_int; pub use self::_SYMCRYPT_ECURVE_GEN_ALG_ID as SYMCRYPT_ECURVE_GEN_ALG_ID; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_ECURVE_PARAMS { pub version: UINT32, pub type_: SYMCRYPT_ECURVE_TYPE, pub algId: SYMCRYPT_ECURVE_GEN_ALG_ID, pub cbFieldLength: UINT32, pub cbSubgroupOrder: UINT32, pub cbCofactor: UINT32, pub cbSeed: UINT32, } #[test] fn bindgen_test_layout__SYMCRYPT_ECURVE_PARAMS() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_ECURVE_PARAMS> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_ECURVE_PARAMS>(), 28usize, concat!("Size of: ", stringify!(_SYMCRYPT_ECURVE_PARAMS)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_ECURVE_PARAMS>(), 4usize, concat!("Alignment of ", stringify!(_SYMCRYPT_ECURVE_PARAMS)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_PARAMS), "::", stringify!(version) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_PARAMS), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).algId) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_PARAMS), "::", stringify!(algId) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbFieldLength) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_PARAMS), "::", stringify!(cbFieldLength) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSubgroupOrder) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_PARAMS), "::", stringify!(cbSubgroupOrder) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbCofactor) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_PARAMS), "::", stringify!(cbCofactor) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbSeed) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_ECURVE_PARAMS), "::", stringify!(cbSeed) ) ); } impl Default for _SYMCRYPT_ECURVE_PARAMS { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_ECURVE_PARAMS = _SYMCRYPT_ECURVE_PARAMS; pub type PCSYMCRYPT_ECURVE_PARAMS = *const SYMCRYPT_ECURVE_PARAMS; pub const _SYMCRYPT_ECPOINT_FORMAT_SYMCRYPT_ECPOINT_FORMAT_X: _SYMCRYPT_ECPOINT_FORMAT = 1; pub const _SYMCRYPT_ECPOINT_FORMAT_SYMCRYPT_ECPOINT_FORMAT_XY: _SYMCRYPT_ECPOINT_FORMAT = 2; pub type _SYMCRYPT_ECPOINT_FORMAT = ::std::os::raw::c_int; pub use self::_SYMCRYPT_ECPOINT_FORMAT as SYMCRYPT_ECPOINT_FORMAT; extern "C" { pub fn SymCryptRsakeyAllocate( pParams: PCSYMCRYPT_RSA_PARAMS, flags: UINT32, ) -> PSYMCRYPT_RSAKEY; } extern "C" { pub fn SymCryptRsakeyFree(pkObj: PSYMCRYPT_RSAKEY); } extern "C" { pub fn SymCryptEcurveAllocate( pParams: PCSYMCRYPT_ECURVE_PARAMS, flags: UINT32, ) -> PSYMCRYPT_ECURVE; } extern "C" { pub fn SymCryptEcurveFree(pCurve: PSYMCRYPT_ECURVE); } extern "C" { pub fn SymCryptEckeyAllocate(pCurve: PCSYMCRYPT_ECURVE) -> PSYMCRYPT_ECKEY; } extern "C" { pub fn SymCryptEckeyFree(pkObj: PSYMCRYPT_ECKEY); } extern "C" { pub fn SymCryptRsakeyHasPrivateKey(pkRsakey: PCSYMCRYPT_RSAKEY) -> BOOLEAN; } extern "C" { pub fn SymCryptRsakeySizeofModulus(pkRsakey: PCSYMCRYPT_RSAKEY) -> UINT32; } extern "C" { pub fn SymCryptRsakeyModulusBits(pkRsakey: PCSYMCRYPT_RSAKEY) -> UINT32; } extern "C" { pub fn SymCryptRsakeySizeofPublicExponent(pRsakey: PCSYMCRYPT_RSAKEY, index: UINT32) -> UINT32; } extern "C" { pub fn SymCryptRsakeySizeofPrime(pkRsakey: PCSYMCRYPT_RSAKEY, index: UINT32) -> UINT32; } extern "C" { pub fn SymCryptRsakeyGetNumberOfPublicExponents(pkRsakey: PCSYMCRYPT_RSAKEY) -> UINT32; } extern "C" { pub fn SymCryptRsakeyGetNumberOfPrimes(pkRsakey: PCSYMCRYPT_RSAKEY) -> UINT32; } extern "C" { pub fn SymCryptRsakeyGenerate( pkRsakey: PSYMCRYPT_RSAKEY, pu64PubExp: PCUINT64, nPubExp: UINT32, flags: UINT32, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsakeySetValue( pbModulus: PCBYTE, cbModulus: SIZE_T, pu64PubExp: PCUINT64, nPubExp: UINT32, ppPrimes: *mut PCBYTE, pcbPrimes: *mut SIZE_T, nPrimes: UINT32, numFormat: SYMCRYPT_NUMBER_FORMAT, flags: UINT32, pkRsakey: PSYMCRYPT_RSAKEY, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsakeyGetValue( pkRsakey: PCSYMCRYPT_RSAKEY, pbModulus: PBYTE, cbModulus: SIZE_T, pu64PubExp: PUINT64, nPubExp: UINT32, ppPrimes: *mut PBYTE, pcbPrimes: *mut SIZE_T, nPrimes: UINT32, numFormat: SYMCRYPT_NUMBER_FORMAT, flags: UINT32, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsakeyGetCrtValue( pkRsakey: PCSYMCRYPT_RSAKEY, ppCrtExponents: *mut PBYTE, pcbCrtExponents: *mut SIZE_T, nCrtExponents: UINT32, pbCrtCoefficient: PBYTE, cbCrtCoefficient: SIZE_T, pbPrivateExponent: PBYTE, cbPrivateExponent: SIZE_T, numFormat: SYMCRYPT_NUMBER_FORMAT, flags: UINT32, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsakeyExtendKeyUsage( pkRsakey: PSYMCRYPT_RSAKEY, flags: UINT32, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptEcurveSizeofFieldElement(pCurve: PCSYMCRYPT_ECURVE) -> UINT32; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptEcurveParamsNistP256: PCSYMCRYPT_ECURVE_PARAMS; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptEcurveParamsNistP384: PCSYMCRYPT_ECURVE_PARAMS; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptEcurveParamsNistP521: PCSYMCRYPT_ECURVE_PARAMS; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptEcurveParamsCurve25519: PCSYMCRYPT_ECURVE_PARAMS; } extern "C" { pub fn SymCryptEckeySizeofPublicKey( pkEckey: PCSYMCRYPT_ECKEY, ecPointFormat: SYMCRYPT_ECPOINT_FORMAT, ) -> UINT32; } extern "C" { pub fn SymCryptEckeySizeofPrivateKey(pkEckey: PCSYMCRYPT_ECKEY) -> UINT32; } extern "C" { pub fn SymCryptEckeySetValue( pbPrivateKey: PCBYTE, cbPrivateKey: SIZE_T, pbPublicKey: PCBYTE, cbPublicKey: SIZE_T, numFormat: SYMCRYPT_NUMBER_FORMAT, ecPointFormat: SYMCRYPT_ECPOINT_FORMAT, flags: UINT32, pEckey: PSYMCRYPT_ECKEY, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptEckeySetRandom(flags: UINT32, pEckey: PSYMCRYPT_ECKEY) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptEckeyGetValue( pEckey: PCSYMCRYPT_ECKEY, pbPrivateKey: PBYTE, cbPrivateKey: SIZE_T, pbPublicKey: PBYTE, cbPublicKey: SIZE_T, numFormat: SYMCRYPT_NUMBER_FORMAT, ecPointFormat: SYMCRYPT_ECPOINT_FORMAT, flags: UINT32, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsaPkcs1Encrypt( pkRsakey: PCSYMCRYPT_RSAKEY, pbSrc: PCBYTE, cbSrc: SIZE_T, flags: UINT32, nfDst: SYMCRYPT_NUMBER_FORMAT, pbDst: PBYTE, cbDst: SIZE_T, pcbDst: *mut SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsaPkcs1Decrypt( pkRsakey: PCSYMCRYPT_RSAKEY, pbSrc: PCBYTE, cbSrc: SIZE_T, nfSrc: SYMCRYPT_NUMBER_FORMAT, flags: UINT32, pbDst: PBYTE, cbDst: SIZE_T, pcbDst: *mut SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsaOaepEncrypt( pkRsakey: PCSYMCRYPT_RSAKEY, pbSrc: PCBYTE, cbSrc: SIZE_T, hashAlgorithm: PCSYMCRYPT_HASH, pbLabel: PCBYTE, cbLabel: SIZE_T, flags: UINT32, nfDst: SYMCRYPT_NUMBER_FORMAT, pbDst: PBYTE, cbDst: SIZE_T, pcbDst: *mut SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsaOaepDecrypt( pkRsakey: PCSYMCRYPT_RSAKEY, pbSrc: PCBYTE, cbSrc: SIZE_T, nfSrc: SYMCRYPT_NUMBER_FORMAT, hashAlgorithm: PCSYMCRYPT_HASH, pbLabel: PCBYTE, cbLabel: SIZE_T, flags: UINT32, pbDst: PBYTE, cbDst: SIZE_T, pcbDst: *mut SIZE_T, ) -> SYMCRYPT_ERROR; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _SYMCRYPT_OID { pub cbOID: UINT32, pub pbOID: PCBYTE, } #[test] fn bindgen_test_layout__SYMCRYPT_OID() { const UNINIT: ::std::mem::MaybeUninit<_SYMCRYPT_OID> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_SYMCRYPT_OID>(), 16usize, concat!("Size of: ", stringify!(_SYMCRYPT_OID)) ); assert_eq!( ::std::mem::align_of::<_SYMCRYPT_OID>(), 8usize, concat!("Alignment of ", stringify!(_SYMCRYPT_OID)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cbOID) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_OID), "::", stringify!(cbOID) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pbOID) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(_SYMCRYPT_OID), "::", stringify!(pbOID) ) ); } impl Default for _SYMCRYPT_OID { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type SYMCRYPT_OID = _SYMCRYPT_OID; pub type PCSYMCRYPT_OID = *const SYMCRYPT_OID; #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptMd5OidList: [SYMCRYPT_OID; 2usize]; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha1OidList: [SYMCRYPT_OID; 2usize]; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha256OidList: [SYMCRYPT_OID; 2usize]; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha384OidList: [SYMCRYPT_OID; 2usize]; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha512OidList: [SYMCRYPT_OID; 2usize]; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha3_256OidList: [SYMCRYPT_OID; 2usize]; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha3_384OidList: [SYMCRYPT_OID; 2usize]; } #[cfg(target_os = "windows")] #[link(name = "symcrypt", kind = "dylib")] extern "C" { pub static SymCryptSha3_512OidList: [SYMCRYPT_OID; 2usize]; } extern "C" { pub fn SymCryptRsaPkcs1Sign( pkRsakey: PCSYMCRYPT_RSAKEY, pbHashValue: PCBYTE, cbHashValue: SIZE_T, pHashOIDs: PCSYMCRYPT_OID, nOIDCount: SIZE_T, flags: UINT32, nfSignature: SYMCRYPT_NUMBER_FORMAT, pbSignature: PBYTE, cbSignature: SIZE_T, pcbSignature: *mut SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsaPkcs1Verify( pkRsakey: PCSYMCRYPT_RSAKEY, pbHashValue: PCBYTE, cbHashValue: SIZE_T, pbSignature: PCBYTE, cbSignature: SIZE_T, nfSignature: SYMCRYPT_NUMBER_FORMAT, pHashOID: PCSYMCRYPT_OID, nOIDCount: SIZE_T, flags: UINT32, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsaPssSign( pkRsakey: PCSYMCRYPT_RSAKEY, pbHashValue: PCBYTE, cbHashValue: SIZE_T, hashAlgorithm: PCSYMCRYPT_HASH, cbSalt: SIZE_T, flags: UINT32, nfSignature: SYMCRYPT_NUMBER_FORMAT, pbSignature: PBYTE, cbSignature: SIZE_T, pcbSignature: *mut SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptRsaPssVerify( pkRsakey: PCSYMCRYPT_RSAKEY, pbHashValue: PCBYTE, cbHashValue: SIZE_T, pbSignature: PCBYTE, cbSignature: SIZE_T, nfSignature: SYMCRYPT_NUMBER_FORMAT, hashAlgorithm: PCSYMCRYPT_HASH, cbSalt: SIZE_T, flags: UINT32, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptEcDsaSign( pKey: PCSYMCRYPT_ECKEY, pbHashValue: PCBYTE, cbHashValue: SIZE_T, format: SYMCRYPT_NUMBER_FORMAT, flags: UINT32, pbSignature: PBYTE, cbSignature: SIZE_T, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptEcDsaVerify( pKey: PCSYMCRYPT_ECKEY, pbHashValue: PCBYTE, cbHashValue: SIZE_T, pbSignature: PCBYTE, cbSignature: SIZE_T, format: SYMCRYPT_NUMBER_FORMAT, flags: UINT32, ) -> SYMCRYPT_ERROR; } extern "C" { pub fn SymCryptEcDhSecretAgreement( pkPrivate: PCSYMCRYPT_ECKEY, pkPublic: PCSYMCRYPT_ECKEY, format: SYMCRYPT_NUMBER_FORMAT, flags: UINT32, pbAgreedSecret: PBYTE, cbAgreedSecret: SIZE_T, ) -> SYMCRYPT_ERROR; }