[−][src]Struct sgx_tdh::SgxDhMsg3
Type for MSG3 used in DH secure session establishment.
Fields
cmac: [u8; 16]
msg3_body: SgxDhMsg3Body
Methods
impl SgxDhMsg3
[src]
pub fn new() -> Self
[src]
Create a SgxDhMsg3 with default values.
pub fn calc_raw_sealed_data_size(&self) -> u32
[src]
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]
&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]
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]
fn clone(&self) -> SgxDhMsg3
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for SgxDhMsg3
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,