Struct sgx_tdh::SgxDhMsg3 [−][src]
pub struct SgxDhMsg3 { pub cmac: [u8; 16], pub msg3_body: SgxDhMsg3Body, }
Type for MSG3 used in DH secure session establishment.
Fields
cmac: [u8; 16]
msg3_body: SgxDhMsg3Body
Methods
impl SgxDhMsg3
[src]
impl SgxDhMsg3
pub fn new() -> Self
[src]
pub fn new() -> Self
Create a SgxDhMsg3 with default values.
pub fn calc_raw_sealed_data_size(&self) -> u32
[src]
pub fn calc_raw_sealed_data_size(&self) -> u32
Calculate the size of sgx_dh_msg3_t converted from SgxDhMsg3, really add the size of struct sgx_dh_msg3_t and msg3_body.additional_prop.
Return value
The size of sgx_dh_msg3_t needed.
pub unsafe fn to_raw_dh_msg3_t(
&self,
p: *mut sgx_dh_msg3_t,
len: u32
) -> Option<*mut sgx_dh_msg3_t>
[src]
pub unsafe fn to_raw_dh_msg3_t(
&self,
p: *mut sgx_dh_msg3_t,
len: u32
) -> Option<*mut sgx_dh_msg3_t>
Convert SgxDhMsg3 to sgx_dh_msg3_t, this is an unsafe function.
Parameters
p
The pointer of a sgx_dh_msg3_t buffer to save the buffer of SgxDhMsg3.
len
The size of the sgx_dh_msg3_t buffer.
Return value
*Some(mut sgx_dh_msg3_t)
Indicates the conversion is successfully. The return value is the mutable pointer of sgx_dh_msg3_t.
None
The parameters p and len are not available for the conversion.
pub unsafe fn from_raw_dh_msg3_t(
p: *mut sgx_dh_msg3_t,
len: u32
) -> Option<Self>
[src]
pub unsafe fn from_raw_dh_msg3_t(
p: *mut sgx_dh_msg3_t,
len: u32
) -> Option<Self>
Convert sgx_dh_msg3_t to SgxDhMsg3, this is an unsafe function.
Parameters
p
The pointer of a sgx_dh_msg3_t buffer.
len
The size of the sgx_dh_msg3_t buffer.
Return value
Some(SgxDhMsg3)
Indicates the conversion is successfully. The return value is SgxDhMsg3.
None
The parameters p and len are not available for the conversion.
Trait Implementations
impl Clone for SgxDhMsg3
[src]
impl Clone for SgxDhMsg3
fn clone(&self) -> SgxDhMsg3
[src]
fn clone(&self) -> SgxDhMsg3
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for SgxDhMsg3
[src]
impl Default for SgxDhMsg3